(38.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (4.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateUsers (20141102231412)  (0.8ms) BEGIN  (41.7ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp, "updated_at" timestamp)  SQL (14.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231412"]]  (6.5ms) COMMIT Migrating to CreateNotifyUserNotifications (20141102231413669669843000)  (0.3ms) BEGIN  (4.7ms) 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, "updated_at" timestamp)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231413669669843000"]]  (0.5ms) COMMIT Migrating to CreateNotifyUserUnsubscribes (20141102231413670670945000)  (0.3ms) BEGIN  (3.7ms) CREATE TABLE "notify_user_unsubscribes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "created_at" timestamp, "updated_at" timestamp)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231413670670945000"]]  (0.6ms) COMMIT Migrating to CreateNotifyUserUserHashes (20141102231413671671735000)  (0.2ms) BEGIN  (15.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, "updated_at" timestamp)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231413671671735000"]]  (11.2ms) COMMIT ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (118.3ms) DROP DATABASE IF EXISTS "notify_user_test"  (252.4ms) CREATE DATABASE "notify_user_test" ENCODING = 'unicode' SQL (1.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (5.9ms) 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, "updated_at" timestamp)  (3.6ms) CREATE TABLE "notify_user_unsubscribes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "created_at" timestamp, "updated_at" timestamp)   (3.1ms) 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, "updated_at" timestamp)  (2.6ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp, "updated_at" timestamp)   (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.4ms) SELECT version FROM "schema_migrations"  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231413671671735000')  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231412')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231413669669843000')  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231413670670945000')  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (11.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00]]  (4.0ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 17ms (Views: 13.8ms | ActiveRecord: 0.0ms)  (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", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:21 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" = 2 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (7.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 2], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 2 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) 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 13ms (Views: 5.9ms | ActiveRecord: 1.2ms)  (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", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Sun, 02 Nov 2014 23:14:21 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:21 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 409ms (Views: 407.6ms | ActiveRecord: 0.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (1.0ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) 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') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 4]]  (0.3ms) 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.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 5 [["state", "read"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 1.7ms | ActiveRecord: 2.6ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 5 ORDER BY "notify_user_notifications"."id" ASC 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} NotifyUser::BaseNotification Load (0.4ms) 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') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 5]]  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 8 [["state", "read"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.8ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} NotifyUser::BaseNotification Load (0.5ms) 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') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) 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 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) 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.9ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 7], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["14"]} SQL (0.4ms) 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 4ms (Views: 1.6ms | ActiveRecord: 1.0ms) 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", 14]]  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 8], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["15"]} SQL (0.4ms) 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.5ms) 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 3ms (Views: 1.2ms | ActiveRecord: 0.8ms)  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 9 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 9], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) 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.3ms) 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.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 9) LIMIT 1 SQL (7.0ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 9], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) 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 29ms (Views: 0.4ms | ActiveRecord: 8.9ms) NotifyUser::Unsubscribe Load (0.7ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 10 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 10], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.6ms) 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.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'  (0.3ms) 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 4ms (Views: 0.3ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.2ms) 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.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 11], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.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" = 11) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 11], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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 7ms (ActiveRecord: 1.6ms) NotifyUser::Unsubscribe Load (1.1ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 12], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 12], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) 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.2ms) SAVEPOINT active_record_1 SQL (0.5ms) 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 3ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) 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" = 13 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 13], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (1.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 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" = 'jSkZDe7hygQSwtkV3dZofQx65kOhp4dik6hiCH-35-Rw' LIMIT 1 SQL (0.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 13], ["target_type", "User"], ["token", "jSkZDe7hygQSwtkV3dZofQx65kOhp4dik6hiCH-35-Rw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"jSkZDe7hygQSwtkV3dZofQx65kOhp4dik6hiCH-35-Rw"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jSkZDe7hygQSwtkV3dZofQx65kOhp4dik6hiCH-35-Rw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jSkZDe7hygQSwtkV3dZofQx65kOhp4dik6hiCH-35-Rw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 13]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 13], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 1 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) 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 (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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 14], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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.1ms) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 15], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 16], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 17], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 24 [["params", {"listing_id"=>1}], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 18], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) 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.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 25 [["params", {"listing_id"=>1}], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 19], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 26 [["params", {:listing_id=>1}], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 20], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 27 [["params", {:listing_id=>1}], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 21], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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 (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 22 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 22], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) 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" = 22 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 29]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 22]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "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.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 22]]  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 29 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 29 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 22]]  (0.3ms) 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" = 'action_mailer' NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 29 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 22]]  (0.3ms) 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" = 'apns'  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 23], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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) RELEASE SAVEPOINT active_record_1  (0.3ms) 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 != 30) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 30]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 23]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "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'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 23]]  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 30 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 30 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 23]]  (0.3ms) 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" = '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" = 30 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 23]]  (0.3ms) 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" = 'apns'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 24], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 24 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 24 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 31)  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 24], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 24 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 32)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 25], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 25], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) 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", 34]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 25]] 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" = 25 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 25]]  (0.3ms) 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.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 33 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 25]]  (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.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 34 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 'action_mailer' NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 25 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yW89hxqz5_7vhC0I1xFQfwuhmPEXo6krcSHC7fkz_snw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 25], ["target_type", "User"], ["token", "yW89hxqz5_7vhC0I1xFQfwuhmPEXo6krcSHC7fkz_snw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (11.1ms) Date: Mon, 03 Nov 2014 10:14:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456baced8dd7_148c83ff6b941fbdc562de@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 26 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 26], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 35]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 26]] NewPostNotification Load (0.3ms) 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" = 26 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 26]]  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 35 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 35 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 26]]  (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.5ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 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" = '6m6PiaHgf35u0zrygzpGMwmzyfrtji4NeTRQFjdyivhQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 26], ["target_type", "User"], ["token", "6m6PiaHgf35u0zrygzpGMwmzyfrtji4NeTRQFjdyivhQ"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.7ms) Date: Mon, 03 Nov 2014 10:14:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bacee2d63_148c83ff6b941fbdc563b9@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.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" = 'apns'  (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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 27) 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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 27], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 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" = 28 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 28], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 36 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 28]]  (0.3ms) 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" = '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", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 29], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["state", "pending"], ["target_id", 29], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 29]] 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" = 29 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 29]]  (0.3ms) 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) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 37 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 29]]  (0.3ms) 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) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 38 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 29 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Dn4qu-9GzZ2EIkfr5RV-vwZA7rRao34uGOY0M1INx6pQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00], ["target_id", 29], ["target_type", "User"], ["token", "Dn4qu-9GzZ2EIkfr5RV-vwZA7rRao34uGOY0M1INx6pQ"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.5ms) Date: Mon, 03 Nov 2014 10:14:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bacef357c_148c83ff6b941fbdc56442@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["state", "pending"], ["target_id", 30], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 39]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 30]] 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" = 30 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.3ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 30]]  (0.3ms) 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) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 39 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) 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" = 39 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 30]]  (0.3ms) 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' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 30 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dIEsKint438sD0uCjKkeagXcNRZ3OGugMd7n3yCPFL3g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 30], ["target_type", "User"], ["token", "dIEsKint438sD0uCjKkeagXcNRZ3OGugMd7n3yCPFL3g"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.6ms) Date: Mon, 03 Nov 2014 10:14:23 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bacf817f_148c83ff6b941fbdc56530@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["state", "pending"], ["target_id", 31], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 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" = 31 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE 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) SAVEPOINT active_record_1  (0.3ms) 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' SQL (2.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 40 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:23 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" = 40 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 31]]  (0.3ms) 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" = 'action_mailer'  (0.3ms) 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" = 'apns'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 32) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 32], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (1.1ms) 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) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) 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) 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) 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" = 33) 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 33], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 7 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 33) LIMIT 1  (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" = 33 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["state", "pending"], ["target_id", 33], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 41 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 41 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 33]]  (0.3ms) 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" = 'action_mailer'  (0.4ms) 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" = 'apns'  (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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 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" = 34 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["state", "pending"], ["target_id", 34], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8p5HDgoUHDXD2rCVeRAIyAumVH7g1fXivG8uzSA7G__Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 34], ["target_type", "User"], ["token", "8p5HDgoUHDXD2rCVeRAIyAumVH7g1fXivG8uzSA7G__Q"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 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" = 35 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["state", "pending"], ["target_id", 35], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (1.2ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 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" = 'xE1M7TSdPk89TQMDxYk2ogiWR9AMYPbCuMsvbmpNH93A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 35], ["target_type", "User"], ["token", "xE1M7TSdPk89TQMDxYk2ogiWR9AMYPbCuMsvbmpNH93A"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["state", "pending"], ["target_id", 36], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 36 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GRLyUlepYwDaHWMY-ABc1AfZYp1M3kIuD6bnHJWfbmmA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 36], ["target_type", "User"], ["token", "GRLyUlepYwDaHWMY-ABc1AfZYp1M3kIuD6bnHJWfbmmA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 8 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 36 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Ev4uULfYvOnQXfLJonxaUgx659jWEI_w135AZc6Tlnng' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 36], ["target_type", "User"], ["token", "Ev4uULfYvOnQXfLJonxaUgx659jWEI_w135AZc6Tlnng"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 37], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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 TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 38], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 39) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 39], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 10 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 39) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 39) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) 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' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 39 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 10]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 39 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 40 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 40], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '24hLSumYspYy0sW7vEN0rwdcaMP5wJXbjoM6UMUC2ozQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 41], ["target_type", "User"], ["token", "24hLSumYspYy0sW7vEN0rwdcaMP5wJXbjoM6UMUC2ozQ"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '24hLSumYspYy0sW7vEN0rwdcaMP5wJXbjoM6UMUC2ozQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '55LccQahUuU0Z3sLccVsvQLheNeJ3CRIfKDjbNYPyrzg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 42], ["target_type", "User"], ["token", "55LccQahUuU0Z3sLccVsvQLheNeJ3CRIfKDjbNYPyrzg"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 11 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '55LccQahUuU0Z3sLccVsvQLheNeJ3CRIfKDjbNYPyrzg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 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" = 'LYZOqGBzH_56-5eHxcuOBAw7AFUMfchzS9T6q_U6LaDg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 43], ["target_type", "User"], ["token", "LYZOqGBzH_56-5eHxcuOBAw7AFUMfchzS9T6q_U6LaDg"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 12 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) 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" = 'gJO5bZLBfPAcJ8rLguDTPgg1XrPmXUiA7R_pH7U9vjsA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00], ["target_id", 44], ["target_type", "User"], ["token", "gJO5bZLBfPAcJ8rLguDTPgg1XrPmXUiA7R_pH7U9vjsA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:14:23 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 14ms (Views: 10.8ms | ActiveRecord: 0.0ms)  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 90 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 90], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 90 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 90 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 5.8ms | ActiveRecord: 1.3ms)  (0.2ms) 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 91], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 91], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 91 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 91], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 91 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 31ms (Views: 29.5ms | ActiveRecord: 0.5ms)  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 92 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 92], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 92 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 92], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 92 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 92], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"95"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 92 AND "notify_user_notifications"."target_type" = 'User' AND (id = '95') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 92]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 92 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 95 [["state", "read"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 1.8ms | ActiveRecord: 2.8ms) NotifyUser::BaseNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 95 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 93 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 93], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 93 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 93], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 93 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 93], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"98"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 93 AND "notify_user_notifications"."target_type" = 'User' AND (id = '98') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 93]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 93 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 98 [["state", "read"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"98"} NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 93 AND "notify_user_notifications"."target_type" = 'User' AND (id = '98') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 94 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 94], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 94 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 94], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 94 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 94], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 94 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 3ms (ActiveRecord: 0.8ms) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 94 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 95 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 95], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["104"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 95 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('104')) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 95 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('104')) Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.9ms) 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", 104]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 96 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 96], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["105"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 96 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('105')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 96 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('105')) Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 97 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 97], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 97 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 97 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 97) LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 97], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 97 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 19ms (Views: 0.3ms | ActiveRecord: 2.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 97 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 98], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 99 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 99], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.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" = 99) 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 99], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 99 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 6ms (ActiveRecord: 1.8ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 100 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 100], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 100) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 100], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 100 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 23]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 101 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 101], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 101 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vi5pe5KF64ZUf7FS6G1GOwLgFYQq_4ogpKA9de9gveLQ' LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 101], ["target_type", "User"], ["token", "vi5pe5KF64ZUf7FS6G1GOwLgFYQq_4ogpKA9de9gveLQ"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"vi5pe5KF64ZUf7FS6G1GOwLgFYQq_4ogpKA9de9gveLQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vi5pe5KF64ZUf7FS6G1GOwLgFYQq_4ogpKA9de9gveLQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vi5pe5KF64ZUf7FS6G1GOwLgFYQq_4ogpKA9de9gveLQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 101]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 101) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 101], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 27 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 102], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 102 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 103 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 103], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 104], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 105], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 114 [["params", {"listing_id"=>1}], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 106 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 106], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 106 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 115 [["params", {"listing_id"=>1}], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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.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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 107 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 107], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 107 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 116 [["params", {:listing_id=>1}], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 108], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 117 [["params", {:listing_id=>1}], ["updated_at", Sun, 02 Nov 2014 23:33:21 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 109], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 110], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 110 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 119) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 119]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 110]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 110 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 110]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 119 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 119 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 110]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 119 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 110]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 111], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 111 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 120) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 120]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 111]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 111 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 111]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 120 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 120 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 111]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 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" = 120 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 111]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 112], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 112 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 121)  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 112], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 112 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 122)  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 113], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 113], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 124]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 113]] NewPostNotification Load (0.3ms) 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" = 113 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 113]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 123 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 113]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 124 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 113 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mfrf2k56K_-ImO9oiqwQSgoQ91LX_wKTHH-qLcQNzkaA' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 113], ["target_type", "User"], ["token", "mfrf2k56K_-ImO9oiqwQSgoQ91LX_wKTHH-qLcQNzkaA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.2ms) Date: Mon, 03 Nov 2014 10:33:21 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bf41c0583_216e3fd63e02dbdc7c1@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 114], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = $1 LIMIT 1 [["id", 125]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 114]] NewPostNotification Load (0.3ms) 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" = 114 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 114]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 125 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 125 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 114]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 114 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Q69Rs3k3C9U8IFaFQ-0xXA2B9-8uNELSRj6XsOjI76tA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 114], ["target_type", "User"], ["token", "Q69Rs3k3C9U8IFaFQ-0xXA2B9-8uNELSRj6XsOjI76tA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Mon, 03 Nov 2014 10:33:21 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bf41c922f_216e3fd63e02dbdc866@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 115) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 115], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 115 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 116], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 126 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 116]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 117], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 117], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 128]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 117]] 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" = 117 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 117]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 127 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 117]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 128 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 117 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cY9fYofWOCYKG-kPQg2bDgPUN0Nlb-DVsBJ7CWEFttyA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 117], ["target_type", "User"], ["token", "cY9fYofWOCYKG-kPQg2bDgPUN0Nlb-DVsBJ7CWEFttyA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.4ms) Date: Mon, 03 Nov 2014 10:33:21 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bf41d7841_216e3fd63e02dbdc915@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 118], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 129]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 118]] NewPostNotification Load (0.3ms) 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" = 118 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 118]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 129 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 129 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 118]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 118 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nuPPUswgk59Y0gqZSH_TUwG6poj0raxMkcPmPA2oi6Rg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 118], ["target_type", "User"], ["token", "nuPPUswgk59Y0gqZSH_TUwG6poj0raxMkcPmPA2oi6Rg"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Mon, 03 Nov 2014 10:33:21 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456bf41df55a_216e3fd63e02dbdc1069@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 119], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 130 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 130 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 119]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 120) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 120], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 120 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" = 120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 121) 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 121], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 27 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 121) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 121], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 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" = 121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 131 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 131 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 121]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 121 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 122 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 122], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 122 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SikGY7bhvHWNNfY4Jk3Umgma01iUJ1pf8PB4Xx36u6nw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 122], ["target_type", "User"], ["token", "SikGY7bhvHWNNfY4Jk3Umgma01iUJ1pf8PB4Xx36u6nw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 123 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["state", "pending"], ["target_id", 123], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 123 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NevmpRqXq7_5BSpfUy-QsAQ28021S4dF4JqDHoHah8zA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["target_id", 123], ["target_type", "User"], ["token", "NevmpRqXq7_5BSpfUy-QsAQ28021S4dF4JqDHoHah8zA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 123 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Sun, 02 Nov 2014 23:33:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:21 UTC +00:00]]  (0.1ms) 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" = 124 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["state", "pending"], ["target_id", 124], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 124 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'FD04ctfKGSd8wYq0cM98CwrEjGSIeNxuzQxth0xRL3Ew' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 124], ["target_type", "User"], ["token", "FD04ctfKGSd8wYq0cM98CwrEjGSIeNxuzQxth0xRL3Ew"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 34 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 124 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fB6MmYQn7456HILubvCbqAThWZwnoe8MZby5BMWL-gQw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 124], ["target_type", "User"], ["token", "fB6MmYQn7456HILubvCbqAThWZwnoe8MZby5BMWL-gQw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) 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" = 125) 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", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 125], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 28 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 125) LIMIT 1  (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" = 125 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.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 126) 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", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 126], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 29 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 126) LIMIT 1  (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" = 126 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 127) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 127], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 30 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 127) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 127) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 127 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" = 127 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 30]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 127 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 128 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", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 128], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pY9eQ2_H33hAXMA7aXKo5gfciNKuoIjmcxQ9Cth-EWvA' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 129], ["target_type", "User"], ["token", "pY9eQ2_H33hAXMA7aXKo5gfciNKuoIjmcxQ9Cth-EWvA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pY9eQ2_H33hAXMA7aXKo5gfciNKuoIjmcxQ9Cth-EWvA' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 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" = 'YLbk0jIVP7eh2YL1JiMOEwWH9Q43cMlBd9mf_EyRl0Ow' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 130], ["target_type", "User"], ["token", "YLbk0jIVP7eh2YL1JiMOEwWH9Q43cMlBd9mf_EyRl0Ow"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 37 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YLbk0jIVP7eh2YL1JiMOEwWH9Q43cMlBd9mf_EyRl0Ow' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) 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", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TRtlg4_dpsEhxqzWB0VP8QYFk8c_SKFz2apo9aAz7_Fw' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 131], ["target_type", "User"], ["token", "TRtlg4_dpsEhxqzWB0VP8QYFk8c_SKFz2apo9aAz7_Fw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 38 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'saGFfo30i9MYgrQhwztJxwk_C4pfYv3N7Z1g2MAsjLag' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00], ["target_id", 132], ["target_type", "User"], ["token", "saGFfo30i9MYgrQhwztJxwk_C4pfYv3N7Z1g2MAsjLag"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:33:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.6ms) Completed 200 OK in 24ms (Views: 20.8ms | ActiveRecord: 0.0ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 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" = 222 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 222], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.9ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 222 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (2.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 222 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 19ms (Views: 8.7ms | ActiveRecord: 3.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 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" = 223 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 223 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 223 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 223 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 40ms (Views: 37.8ms | ActiveRecord: 0.7ms)  (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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 224 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 224 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 224 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"230"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 224 AND "notify_user_notifications"."target_type" = 'User' AND (id = '230') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 224]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 230 [["state", "read"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 1.7ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 230 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 225 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 225], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 225 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 225], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) 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" = 225 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 225], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"233"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 225 AND "notify_user_notifications"."target_type" = 'User' AND (id = '233') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 225]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 233 [["state", "read"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.8ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"233"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 225 AND "notify_user_notifications"."target_type" = 'User' AND (id = '233') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 2.2ms)  (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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 226 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 226], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 226 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 226], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 226 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 226], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 226 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 226 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 227 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 227], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["239"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 227 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('239')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 227 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('239')) Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 239]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 228 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 228], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["240"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 228 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('240')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 228 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('240')) Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 229 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 229], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 229 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 229 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 229) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["target_id", 229], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 229 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 229 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 230 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 230], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 230 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 230 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 230 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 230 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 231 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 231], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 231) 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["target_id", 231], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 232 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 232], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 232) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["target_id", 232], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 53]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 233 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 233], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) 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" = 233 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'aspMbjPa7gN_n1wweAeYqgBzIvEmi6mJ0AMWgtrf9ORw' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["target_id", 233], ["target_type", "User"], ["token", "aspMbjPa7gN_n1wweAeYqgBzIvEmi6mJ0AMWgtrf9ORw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"aspMbjPa7gN_n1wweAeYqgBzIvEmi6mJ0AMWgtrf9ORw"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'aspMbjPa7gN_n1wweAeYqgBzIvEmi6mJ0AMWgtrf9ORw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'aspMbjPa7gN_n1wweAeYqgBzIvEmi6mJ0AMWgtrf9ORw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 233]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 233) 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", Sun, 02 Nov 2014 23:42:33 UTC +00:00], ["target_id", 233], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 66 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:42:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.4ms) 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 (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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 234 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 234], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 234 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 235], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 236 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 236], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 237 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 237], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 237 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 249 [["params", {"listing_id"=>1}], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) 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.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 238 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 238], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 238 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 250 [["params", {"listing_id"=>1}], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 239 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 239], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 239 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 251 [["params", {:listing_id=>1}], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 240 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 240], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 240 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 252 [["params", {:listing_id=>1}], ["updated_at", Sun, 02 Nov 2014 23:42:34 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 241], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = 242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 242], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 242 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 254) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 254]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 242]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 242 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 242]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 254 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 254 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 242]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 242 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" = 254 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 242]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 243], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 243 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 255) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 255]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 243]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 243 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 243]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 255 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 255 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 243]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 243 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" = 255 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 243]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 243 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 244 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 244], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 244 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 244 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 256)  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 244 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 244], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 244 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 257)  (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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 245], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = 245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 245], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = $1 LIMIT 1 [["id", 259]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 245]] NewPostNotification Load (0.3ms) 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" = 245 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 245]]  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 258 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 245]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 259 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 245 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kP6fZZxBdhxNN8BIlFCCRQddKDs1uBcLfIKJTMf8HkCg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 245], ["target_type", "User"], ["token", "kP6fZZxBdhxNN8BIlFCCRQddKDs1uBcLfIKJTMf8HkCg"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (14.3ms) Date: Mon, 03 Nov 2014 10:42:34 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456c16a39c5a_8b773fd37e02dbe0590ac@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = 246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 246], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) 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", 260]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 246]] 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" = 246 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 246]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 260 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 260 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 246]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (1.0ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 246 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 's074onuUC6XdDXKrBHVKJQjG3Gm8rX4b4AtZtBHuuwuA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 246], ["target_type", "User"], ["token", "s074onuUC6XdDXKrBHVKJQjG3Gm8rX4b4AtZtBHuuwuA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.0ms) Date: Mon, 03 Nov 2014 10:42:34 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456c16a46238_8b773fd37e02dbe059116@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 247) 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 247], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 247 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (1.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 248 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 248], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 261 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 248]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 248 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 249], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 249], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 263]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 249]] 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" = 249 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 249]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 262 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 249]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 263 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 249 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3EgkO2M8p4lvcuLMYoj7vgZ2ZWMq1jjj3mhb4Bl0bW1w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 249], ["target_type", "User"], ["token", "3EgkO2M8p4lvcuLMYoj7vgZ2ZWMq1jjj3mhb4Bl0bW1w"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.4ms) Date: Mon, 03 Nov 2014 10:42:34 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456c16a578f5_8b773fd37e02dbe05925e@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 250], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (1.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 264]] User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 250]] 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" = 250 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 250]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 264 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 264 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 250]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 250 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" = 250 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3-bjH5c5HX7g9zKyj3TMvA9LNUm-RbodkXOdeCRQbdcw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 250], ["target_type", "User"], ["token", "3-bjH5c5HX7g9zKyj3TMvA9LNUm-RbodkXOdeCRQbdcw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (4.9ms) Date: Mon, 03 Nov 2014 10:42:34 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5456c16a603b9_8b773fd37e02dbe059355@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = 251 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 251], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 251 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 251 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 251 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 265 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) 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" = 265 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 251]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 251 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 251 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 252) LIMIT 1 SQL (0.9ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 252], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 252 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 252 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" = 252 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 253) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 253], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 57 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 253) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 253], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 266 [["state", "sent"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 266 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 253]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 254 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 254], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 254 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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" = 'E5r7wp9yYluTyIJclDrt_QIbBTPISVGfjRmkm-AjXU5A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 254], ["target_type", "User"], ["token", "E5r7wp9yYluTyIJclDrt_QIbBTPISVGfjRmkm-AjXU5A"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 255 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 255 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yzZswcvfTfu267sbY0L50wCYM5-SvANB-wDstFrlgKnQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 255], ["target_type", "User"], ["token", "yzZswcvfTfu267sbY0L50wCYM5-SvANB-wDstFrlgKnQ"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 255 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = 256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["state", "pending"], ["target_id", 256], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 256 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oQ5cj9KYvVH_j-QWSirlwQ2JZHuOaYsDxh_Og6jWFKLA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 256], ["target_type", "User"], ["token", "oQ5cj9KYvVH_j-QWSirlwQ2JZHuOaYsDxh_Og6jWFKLA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 73 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 256 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'N6d-vCUYyyDfPBaFIku5GgS41F7CGIk66zRB6twNRK9A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 256], ["target_type", "User"], ["token", "N6d-vCUYyyDfPBaFIku5GgS41F7CGIk66zRB6twNRK9A"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 257) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 58 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 257) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 257 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 258) 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 258], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 59 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 258) LIMIT 1  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 258 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.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 259) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 259], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 60 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 259) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 259) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 259 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 259 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 60]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 259 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 260 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", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 260], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ntsM-9EZLwA4UAUVLBEKWw_V_3UY9gtmGLgLJSnCM0WA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 261], ["target_type", "User"], ["token", "ntsM-9EZLwA4UAUVLBEKWw_V_3UY9gtmGLgLJSnCM0WA"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ntsM-9EZLwA4UAUVLBEKWw_V_3UY9gtmGLgLJSnCM0WA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Knyiu9pF9c9NV-cvdp0bKgh5QNqtzhr4KrRpdERSBLGg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 262], ["target_type", "User"], ["token", "Knyiu9pF9c9NV-cvdp0bKgh5QNqtzhr4KrRpdERSBLGg"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 76 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Knyiu9pF9c9NV-cvdp0bKgh5QNqtzhr4KrRpdERSBLGg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 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" = 'BVLZV5n5EafwRAv16Rh7rAqPq7aTW1Q5ff4TLDUUzZOw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 263], ["target_type", "User"], ["token", "BVLZV5n5EafwRAv16Rh7rAqPq7aTW1Q5ff4TLDUUzZOw"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 77 [["active", false], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) 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" = 'Xp8uMdrOCqZkgqh47ffAswaIMd4HTEY-zjczRtcGZ7bg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00], ["target_id", 264], ["target_type", "User"], ["token", "Xp8uMdrOCqZkgqh47ffAswaIMd4HTEY-zjczRtcGZ7bg"], ["type", "NewPostNotification"], ["updated_at", Sun, 02 Nov 2014 23:42:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (8.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 22ms (Views: 17.3ms | ActiveRecord: 0.0ms)  (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", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:46 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" = 398 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 398], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 398 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 398 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 500 Internal Server Error in 22ms  (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", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 399 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", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 399 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", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 399 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", Fri, 19 Dec 2014 00:08:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 399 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 445ms (Views: 443.9ms | ActiveRecord: 0.5ms)  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 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" = 400 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 400], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 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" = 400 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 400], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 400 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 400], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"410"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 400 AND "notify_user_notifications"."target_type" = 'User' AND (id = '410') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 400]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 410 [["state", "read"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 56ms (Views: 3.8ms | ActiveRecord: 2.8ms) NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 410 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.4ms) 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) 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" = 401 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 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" = 401 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 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" = 401 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"413"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 401 AND "notify_user_notifications"."target_type" = 'User' AND (id = '413') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 401]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 413 [["state", "read"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.1ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"413"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 401 AND "notify_user_notifications"."target_type" = 'User' AND (id = '413') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 402 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 402 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 402 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 403 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 403], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (2.0ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["419"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 403 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('419')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 403 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('419')) Completed 500 Internal Server Error in 3ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 404 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 404], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["420"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 404 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('420')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 404 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('420')) Completed 500 Internal Server Error in 3ms  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 405], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 405) 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["target_id", 405], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 19ms (Views: 0.2ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 406], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 407 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 407], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 407) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["target_id", 407], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 407 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 408 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 408], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 408) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["target_id", 408], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 408 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 93]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 409 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 409], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) 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" = 409 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dfda8SeEFJBx-keGfKZV4gdmgqlmO4XkYqodVmbQTUuQ' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["target_id", 409], ["target_type", "User"], ["token", "dfda8SeEFJBx-keGfKZV4gdmgqlmO4XkYqodVmbQTUuQ"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"dfda8SeEFJBx-keGfKZV4gdmgqlmO4XkYqodVmbQTUuQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dfda8SeEFJBx-keGfKZV4gdmgqlmO4XkYqodVmbQTUuQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dfda8SeEFJBx-keGfKZV4gdmgqlmO4XkYqodVmbQTUuQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 409]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 409) 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["target_id", 409], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 118 [["active", false], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 39ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 410], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 410 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 411 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 411], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 412 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 412], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 413 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 413], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 413 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 429 [["params", {"listing_id"=>1}], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 414], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 430 [["params", {"listing_id"=>1}], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 415], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 431 [["params", {:listing_id=>1}], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 416 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 416], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 416 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 432 [["params", {:listing_id=>1}], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 417 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 417], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 418], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) 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" = 418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 418 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 434) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 434]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 418]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 418 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 418]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 434 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 434 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 418]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 434 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 418]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 419], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 419 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 435) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 435]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 419]] NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 419 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 419]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 435 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 435 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 419]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 435 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 419]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 420 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 420], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 420 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 420 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 436)  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 420 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 420], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 420 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 437)  (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", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 421], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["state", "pending"], ["target_id", 421], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) 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" = $1 LIMIT 1 [["id", 439]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 421]] NewPostNotification Load (0.3ms) 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" = 421 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 421]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 438 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 421]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 439 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 421 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'v5SULeZqkFPHuCU6rnNCPQQavhT6kr-tmP8JXp24omJA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00], ["target_id", 421], ["target_type", "User"], ["token", "v5SULeZqkFPHuCU6rnNCPQQavhT6kr-tmP8JXp24omJA"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (46.0ms) Date: Fri, 19 Dec 2014 11:08:48 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54936c901414_169b93fd5b0833bd01188c@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 422], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 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", 440]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 422]] 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" = 422 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 422]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 440 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 440 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 422]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 422 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3ps3x3Ohno0HSSAk9RjdUgGO92Nle1oZF0ZgggR-0_Gw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 422], ["target_type", "User"], ["token", "3ps3x3Ohno0HSSAk9RjdUgGO92Nle1oZF0ZgggR-0_Gw"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (4.8ms) Date: Fri, 19 Dec 2014 11:08:48 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54936c90132f8_169b93fd5b0833bd011927@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 422 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 423) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 423], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 423 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 424 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 424], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 441 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 424]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 424 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 443]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 425]] NewPostNotification Load (0.3ms) 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" = 425 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 425]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 442 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 425]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 443 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 425 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lfn7E7Jno7OHGrv1VcFAvgotBWKUQa033CN7_w7erAPA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 425], ["target_type", "User"], ["token", "lfn7E7Jno7OHGrv1VcFAvgotBWKUQa033CN7_w7erAPA"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.2ms) Date: Fri, 19 Dec 2014 11:08:48 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54936c9022d95_169b93fd5b0833bd0120dd@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have new Newpostnotification notifications. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
=
New Post Notification happened. =
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.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 426 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 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" = $1 LIMIT 1 [["id", 444]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 426]] 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" = 426 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 426]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 426 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 444 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 444 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 426]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 426 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 426 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'E3bJ5qTTTLWJeuP2AzYrGAcecbwlrYMB_InsvJGtSp8g' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 426], ["target_type", "User"], ["token", "E3bJ5qTTTLWJeuP2AzYrGAcecbwlrYMB_InsvJGtSp8g"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.4ms) Date: Fri, 19 Dec 2014 11:08:48 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54936c903453a_169b93fd5b0833bd0121d2@Antons-MacBook-Pro.local.mail> Subject: Rails404: You have a new Newpostnotification notification. Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 427], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 445 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 445 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 427]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 428) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 428], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 429) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 429], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 97 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 429) LIMIT 1  (0.1ms) 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" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 429], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 446 [["state", "sent"], ["updated_at", Fri, 19 Dec 2014 00:08:48 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" = 446 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 429]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 430 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 430], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 430 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PvVPpW3W8yrJMO5NzhcAkQmn9ZmE6PtMXXHdCShyigmw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 430], ["target_type", "User"], ["token", "PvVPpW3W8yrJMO5NzhcAkQmn9ZmE6PtMXXHdCShyigmw"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 431 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 431], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 431 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nfloHwryBo6dWc5wc2jYDgvLb-UsHn9VRmZT-QCHlnyg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 431], ["target_type", "User"], ["token", "nfloHwryBo6dWc5wc2jYDgvLb-UsHn9VRmZT-QCHlnyg"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 431 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 432 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["state", "pending"], ["target_id", 432], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 432 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'S_c_3g4xfBbGp2B02Q6a5AlCEoIgnqNmMA9mgcx80BXg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 432], ["target_type", "User"], ["token", "S_c_3g4xfBbGp2B02Q6a5AlCEoIgnqNmMA9mgcx80BXg"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 125 [["active", false], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) 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" = 432 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'unvGywCT8k10LUuDzfpygw2x-VCtLkikpoWDx6quJg3A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 432], ["target_type", "User"], ["token", "unvGywCT8k10LUuDzfpygw2x-VCtLkikpoWDx6quJg3A"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 433) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 433], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 98 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 433) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 433 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 434) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 434], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 99 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 434) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 434 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 435) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 435], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 100 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 435) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 435) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 435 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 435 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 100]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 435 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 436 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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 436], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 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" = '4NYq_Zm8PpJXhuGuyC4_jAS3-owzu5A9dNhc92lPsYkA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 437], ["target_type", "User"], ["token", "4NYq_Zm8PpJXhuGuyC4_jAS3-owzu5A9dNhc92lPsYkA"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4NYq_Zm8PpJXhuGuyC4_jAS3-owzu5A9dNhc92lPsYkA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ob3_0W_WfOMSHGxBifYvJwRCKzp33MldmY9J1hN053dw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 438], ["target_type", "User"], ["token", "ob3_0W_WfOMSHGxBifYvJwRCKzp33MldmY9J1hN053dw"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 128 [["active", false], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ob3_0W_WfOMSHGxBifYvJwRCKzp33MldmY9J1hN053dw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jhDm_NI22agMLdnnjl4FXgPPC-bELo5gZDyzfZ2kEszg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 439], ["target_type", "User"], ["token", "jhDm_NI22agMLdnnjl4FXgPPC-bELo5gZDyzfZ2kEszg"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 129 [["active", false], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.1ms) 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" = 'f5rZFxWjbsCqiM5xPYxHKQ0eg_mk59NzKwIwYsFjOhaA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00], ["target_id", 440], ["target_type", "User"], ["token", "f5rZFxWjbsCqiM5xPYxHKQ0eg_mk59NzKwIwYsFjOhaA"], ["type", "NewPostNotification"], ["updated_at", Fri, 19 Dec 2014 00:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (1.3ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.4ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (11.4ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (1.8ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.3ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.5ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.4ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.6ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.4ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.4ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.6ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (1.2ms) ROLLBACK  (0.2ms) BEGIN  (0.6ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.7ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.4ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.9ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.4ms) ROLLBACK  (0.6ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.4ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (1.0ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.4ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.9ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) 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  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.6ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.3ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.4ms) ROLLBACK  (0.3ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.4ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block : SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind in ('v','r') AND c.relname = 'notify_user_notifications' AND n.nspname = ANY (current_schemas(false))  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "notify_user_notifications" does not exist LINE 5: WHERE a.attrelid = '"notify_user_notification... ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"notify_user_notifications"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.2ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.1ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (31.8ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (2.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateUsers (20141102231412)  (0.2ms) BEGIN  (4.5ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp, "updated_at" timestamp)  SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231412"]]  (6.4ms) COMMIT Migrating to CreateNotifyUserNotifications (20141102231413669669843000)  (6.3ms) BEGIN  (12.1ms) 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, "updated_at" timestamp)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231413669669843000"]]  (0.5ms) COMMIT Migrating to CreateNotifyUserUnsubscribes (20141102231413670670945000)  (0.3ms) BEGIN  (3.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, "updated_at" timestamp)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231413670670945000"]]  (0.6ms) COMMIT Migrating to CreateNotifyUserUserHashes (20141102231413671671735000)  (0.3ms) BEGIN  (16.3ms) 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, "updated_at" timestamp)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141102231413671671735000"]]  (6.4ms) COMMIT ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (119.2ms) DROP DATABASE IF EXISTS "notify_user_test"  (242.9ms) CREATE DATABASE "notify_user_test" ENCODING = 'unicode' SQL (1.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"  (4.7ms) 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, "updated_at" timestamp)  (3.5ms) CREATE TABLE "notify_user_unsubscribes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "created_at" timestamp, "updated_at" timestamp)   (3.6ms) 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, "updated_at" timestamp)  (2.1ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp, "updated_at" timestamp)   (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)  (2.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.6ms) SELECT version FROM "schema_migrations"  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231413671671735000')  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231412')  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231413669669843000')  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141102231413670670945000')  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.0ms)  (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", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.8ms) 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", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 2], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 2 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) 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 18ms (Views: 11.3ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:55 UTC +00:00]]  (0.1ms) 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 515ms (Views: 513.9ms | ActiveRecord: 0.6ms)  (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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) 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') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 4]]  (0.3ms) 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.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 5 [["state", "read"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 1.8ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 5 ORDER BY "notify_user_notifications"."id" ASC 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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" = 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} NotifyUser::BaseNotification Load (0.5ms) 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') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 5]]  (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.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 8 [["state", "read"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.2ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} NotifyUser::BaseNotification Load (0.4ms) 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') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.6ms)  (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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) 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 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 7], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["14"]} SQL (0.4ms) 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.3ms) 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 4ms (Views: 1.9ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) 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.2ms) ROLLBACK  (0.1ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 8], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["15"]} SQL (0.4ms) 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 4ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 9], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) 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.3ms) 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.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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 (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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 9], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) 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 17ms (Views: 0.3ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (1.0ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 10], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) 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.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'  (0.3ms) 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 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 11], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 11], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) 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 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 12 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 12], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 12], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) 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.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 3]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.4ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 13], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) 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" = 13 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'BziN8sg_AlDopkTB0o6mSgyEyh6LUHBM7XFvLTY498Kw' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 13], ["target_type", "User"], ["token", "BziN8sg_AlDopkTB0o6mSgyEyh6LUHBM7XFvLTY498Kw"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"BziN8sg_AlDopkTB0o6mSgyEyh6LUHBM7XFvLTY498Kw"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'BziN8sg_AlDopkTB0o6mSgyEyh6LUHBM7XFvLTY498Kw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'BziN8sg_AlDopkTB0o6mSgyEyh6LUHBM7XFvLTY498Kw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 13]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 13], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 1 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.3ms) 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 (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (1.1ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 14], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 15], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 16], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 17], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 24 [["params", {"listing_id"=>1}], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 18], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 25 [["params", {"listing_id"=>1}], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 19], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 26 [["params", {:listing_id=>1}], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 20], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 27 [["params", {:listing_id=>1}], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 21], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 22], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 29 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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.3ms) 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.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 22]] NewPostNotification Load (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 23], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 23], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE 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.2ms) SAVEPOINT active_record_1  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 31 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 24], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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.1ms) SAVEPOINT active_record_1  (0.3ms) 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.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 32 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 32]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 24]]  (0.3ms) 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.4ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lTG5W0zJATrsqLyaqxQKoQV7SKCbDYqP753SxhFY3EHg' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 24], ["target_type", "User"], ["token", "lTG5W0zJATrsqLyaqxQKoQV7SKCbDYqP753SxhFY3EHg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.3ms) Date: Mon, 09 Feb 2015 15:02:56 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54d83170a850f_15b883fd288465bf052757@Antons-MacBook-Pro.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.8ms) ROLLBACK  (0.3ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 25], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 33 [["state", "pending_no_aggregation"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 26], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 26) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 26], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 34]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 26]]  (0.3ms) 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'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 27], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 35]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 27]]  (0.3ms) 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.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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 28], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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.1ms) SAVEPOINT active_record_1  (1.0ms) 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.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 36 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 28]]  (0.3ms) 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" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 28 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1ADpkVJPi_QX3BolPBNUnQJK3MtOFc7h612hezAAQt6A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 28], ["target_type", "User"], ["token", "1ADpkVJPi_QX3BolPBNUnQJK3MtOFc7h612hezAAQt6A"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (4.8ms) Date: Mon, 09 Feb 2015 15:02:56 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54d83170ba51a_15b883fd288465bf05288d@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 29], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 37]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 29]]  (0.3ms) 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" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 30], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 30]] 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" = 30 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 30]]  (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) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 38 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 31], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 31], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 40]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 31]] NewPostNotification Load (0.3ms) 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" = 31 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 31]]  (0.3ms) 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' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 39 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 31]]  (0.3ms) 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' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 40 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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" = 32 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 32], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 32 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gbX9nkXhLIohjtHbbytoNQfQSkwLtzlT8bFC2eyk77qQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 32], ["target_type", "User"], ["token", "gbX9nkXhLIohjtHbbytoNQfQSkwLtzlT8bFC2eyk77qQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 33], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 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" = 'mfosZUeh8YrVBZ8DJ0l_0QudqcvE3VXraFJp_ipbBo2A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 33], ["target_type", "User"], ["token", "mfosZUeh8YrVBZ8DJ0l_0QudqcvE3VXraFJp_ipbBo2A"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["state", "pending"], ["target_id", 34], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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" = 34 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HFTVSZZDqHhzjVxet8W3BwDhz7GZ6iHS-uZrA7vI10xw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 34], ["target_type", "User"], ["token", "HFTVSZZDqHhzjVxet8W3BwDhz7GZ6iHS-uZrA7vI10xw"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 6 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '6ghP5UZcd891I2JWNlPt-wsWci6ttGqbpU2q3L-g0sRA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 34], ["target_type", "User"], ["token", "6ghP5UZcd891I2JWNlPt-wsWci6ttGqbpU2q3L-g0sRA"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 35) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 35], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 6 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 35) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 36], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 37], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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  (0.2ms) 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' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* 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.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 8]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* 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.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) 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' 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 38], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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" = '_ca7DKJrh0nYIJ28Qi5Yuwfv1PWhfRJ9A4a3fR7KegHg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 39], ["target_type", "User"], ["token", "_ca7DKJrh0nYIJ28Qi5Yuwfv1PWhfRJ9A4a3fR7KegHg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_ca7DKJrh0nYIJ28Qi5Yuwfv1PWhfRJ9A4a3fR7KegHg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) 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" = 'wgl0WXsYPZM3J_eher7LMQZM-AzkyopZ02RA6s9YjcBQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 40], ["target_type", "User"], ["token", "wgl0WXsYPZM3J_eher7LMQZM-AzkyopZ02RA6s9YjcBQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 9 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'wgl0WXsYPZM3J_eher7LMQZM-AzkyopZ02RA6s9YjcBQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.4ms) 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", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WmrzukNr3pynsuTRoqMlEg_wA0kXKd-BKREyGusxZkjg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 41], ["target_type", "User"], ["token", "WmrzukNr3pynsuTRoqMlEg_wA0kXKd-BKREyGusxZkjg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 10 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.1ms) 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" = 'ZDcoUx4wxCFJ0q1HQ_zxpQkAljNbULkpym0ksctm0Z9Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00], ["target_id", 42], ["target_type", "User"], ["token", "ZDcoUx4wxCFJ0q1HQ_zxpQkAljNbULkpym0ksctm0Z9Q"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:02:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.0ms)  (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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 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" = 44 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 44], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 44 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 44 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.7ms | ActiveRecord: 1.1ms)  (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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 45 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 45], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03: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" = 45 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 45], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 45 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 45], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 45 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 54ms (Views: 52.3ms | ActiveRecord: 0.5ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) 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" = 46 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 46], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 46 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 46], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 46 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 46], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"49"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 46 AND "notify_user_notifications"."target_type" = 'User' AND (id = '49') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 46]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 46 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 49 [["state", "read"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 49 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 47 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 47], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 47 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 47], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 47 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 47], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"52"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 47 AND "notify_user_notifications"."target_type" = 'User' AND (id = '52') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 47]]  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 47 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 52 [["state", "read"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 2.5ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"52"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 47 AND "notify_user_notifications"."target_type" = 'User' AND (id = '52') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.0ms)  (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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 48 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 48], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) 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" = 48 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 48], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 48 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 48], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 48 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 48 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 49 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 49], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["58"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 49 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('58')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 49 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('58')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.6ms) 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", 58]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 50 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 50], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["59"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 50 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('59')) NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 50 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('59')) Completed 200 OK in 5ms (Views: 2.8ms | ActiveRecord: 1.3ms)  (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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 51 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 51], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 51 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 51 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 51) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["target_id", 51], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 51 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 51 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 52 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 52], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 52 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 52 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 52 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 52 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 53 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 53], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 53) 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["target_id", 53], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 53 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 54 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 54], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 54) 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["target_id", 54], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 54 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 11]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 55 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 55], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 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" = 55 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rsQzAbHFrKTXjCHP998p5QvWISlMtehk2WKtKmgWKicQ' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["target_id", 55], ["target_type", "User"], ["token", "rsQzAbHFrKTXjCHP998p5QvWISlMtehk2WKtKmgWKicQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"rsQzAbHFrKTXjCHP998p5QvWISlMtehk2WKtKmgWKicQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rsQzAbHFrKTXjCHP998p5QvWISlMtehk2WKtKmgWKicQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rsQzAbHFrKTXjCHP998p5QvWISlMtehk2WKtKmgWKicQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 55]]  (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" = 55) 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["target_id", 55], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 12 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 56 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 56], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 56 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 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" = 57 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 57], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 58 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 58], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 59 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 59], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 59 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 68 [["params", {"listing_id"=>1}], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 60 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 60], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 60 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 69 [["params", {"listing_id"=>1}], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 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" = 61 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 61], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 61 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 70 [["params", {:listing_id=>1}], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 62 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 62], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 62 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 71 [["params", {:listing_id=>1}], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 63 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 63], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 63 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 64 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00], ["state", "pending"], ["target_id", 64], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 64 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 64 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 73 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 64 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 73) 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", 73]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 64]] NewPostNotification Load (0.3ms) 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" = 64 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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" = 65 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 65], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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" = 65 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 65], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 65 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 65 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 75 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.9ms) 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" = 65 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 75)  (0.5ms) 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 66 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 66], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 66 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 66 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 76 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) 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", 76]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 66]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 66 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 66 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4gPP8oEpl-C99tg6I5hnzASYCqq8vacQbZUmS9Hptx1w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 66], ["target_type", "User"], ["token", "4gPP8oEpl-C99tg6I5hnzASYCqq8vacQbZUmS9Hptx1w"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.2ms) Date: Mon, 09 Feb 2015 15:03:08 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54d8317ce14d_15db73fc9bd465bec118df@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 67 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 67], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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" = 67 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 77 [["state", "pending_no_aggregation"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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" = 68 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 68], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 68) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 68], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 78]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 68]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 68 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 69 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 69], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 79]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 69]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 69 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 70 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 70], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 70 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 70 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 80 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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", 80]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 70]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 70 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 70 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AOnTjSppFSpiIrU6ZbzwXAFR7V1gi_PgRbi3wtZVf6Wg' LIMIT 1 SQL (1.1ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 70], ["target_type", "User"], ["token", "AOnTjSppFSpiIrU6ZbzwXAFR7V1gi_PgRbi3wtZVf6Wg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Mon, 09 Feb 2015 15:03:08 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54d8317c1ece0_15db73fc9bd465bec119fa@Antons-MacBook-Pro.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.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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 71 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 71], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) 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", 81]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 71]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 71 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 72 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 72], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 82]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 72]] NewPostNotification Load (0.3ms) 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" = 72 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 72]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 72 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 82 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 73 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 73], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 73 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 73], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 84]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 73]] NewPostNotification Load (0.3ms) 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" = 73 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 73]]  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 73 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 83 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 73]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 73 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 84 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 74 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 74], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 74 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GJpIGf3dsOfIXpFc_BwsdwIBj8tVtvMuWTsW8ySpwGmA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 74], ["target_type", "User"], ["token", "GJpIGf3dsOfIXpFc_BwsdwIBj8tVtvMuWTsW8ySpwGmA"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 75 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 75], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 75 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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" = 't-tVAXUGaGIBYmMXN40K-Q_lANmJ5B5CHR_mLs_B0eNg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 75], ["target_type", "User"], ["token", "t-tVAXUGaGIBYmMXN40K-Q_lANmJ5B5CHR_mLs_B0eNg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) 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" = 75 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 76 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["state", "pending"], ["target_id", 76], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) 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" = 76 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-RRr3A3xAZugiMlXUdF0Eg17pw7YfBizXmVDd5VkBF8A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 76], ["target_type", "User"], ["token", "-RRr3A3xAZugiMlXUdF0Eg17pw7YfBizXmVDd5VkBF8A"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 17 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 76 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'blLxgeww8WLYWQPsbRwd_QYvMDySsuRE5-9K7HAP5nIg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 76], ["target_type", "User"], ["token", "blLxgeww8WLYWQPsbRwd_QYvMDySsuRE5-9K7HAP5nIg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 77) 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 77], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 14 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 77) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 77 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 78) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 78], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 15 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 78) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 78 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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 79) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 79], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 16 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 79) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 79) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 79 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 79 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 16]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 79 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 80 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 80], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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" = 'uuP37MrBZ6NxIP2R34W-WAuIOoXBBLRJgDB6TnQ1xmXA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 81], ["target_type", "User"], ["token", "uuP37MrBZ6NxIP2R34W-WAuIOoXBBLRJgDB6TnQ1xmXA"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uuP37MrBZ6NxIP2R34W-WAuIOoXBBLRJgDB6TnQ1xmXA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AuUpzMCyWlLLJrQc4ZWBkgUHeK9mXfFQX43K-DHNQ4ug' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 82], ["target_type", "User"], ["token", "AuUpzMCyWlLLJrQc4ZWBkgUHeK9mXfFQX43K-DHNQ4ug"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 20 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AuUpzMCyWlLLJrQc4ZWBkgUHeK9mXfFQX43K-DHNQ4ug' 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", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AhOJE_5TOUOoiU5l7h7eCwkrOpYy0BnqVkNQAm_W-jpA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 83], ["target_type", "User"], ["token", "AhOJE_5TOUOoiU5l7h7eCwkrOpYy0BnqVkNQAm_W-jpA"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 21 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YTDqxWOkEu7TKYSyhbVE9wO-JVIelWh6fdA29few3e2w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:03:08 UTC +00:00], ["target_id", 84], ["target_type", "User"], ["token", "YTDqxWOkEu7TKYSyhbVE9wO-JVIelWh6fdA29few3e2w"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:03:08 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.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 14ms (Views: 11.0ms | ActiveRecord: 0.0ms)  (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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) 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" = 254 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 254], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 254 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 254 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 14ms (Views: 8.4ms | ActiveRecord: 1.2ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 255 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) 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" = 255 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 255 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 255 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 60ms (Views: 58.9ms | ActiveRecord: 0.5ms)  (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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 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" = 256 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 256], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 256 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 256], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 256 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 256], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"269"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 256 AND "notify_user_notifications"."target_type" = 'User' AND (id = '269') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 256]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 269 [["state", "read"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 16ms (Views: 1.7ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 269 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 257 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 257 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 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" = 257 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"272"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 257 AND "notify_user_notifications"."target_type" = 'User' AND (id = '272') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 257]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 257 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 272 [["state", "read"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.8ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"272"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 257 AND "notify_user_notifications"."target_type" = 'User' AND (id = '272') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 258 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 258], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 258 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 258], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 258 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 258], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 258 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 258 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 259 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 259], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["278"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 259 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('278')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 259 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('278')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.6ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 278]]  (0.5ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 260 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 260], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["279"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 260 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('279')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 260 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('279')) Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.7ms)  (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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) 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" = 261 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 261], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 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" = 261 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" = 261 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 261) LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["target_id", 261], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 261 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 261 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 262 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 262], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 262 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 262 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 262 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 262 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 263 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 263], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 263) 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["target_id", 263], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 263 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 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" = 264 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 264], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 264) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["target_id", 264], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.8ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 264 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", 51]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 5ms (ActiveRecord: 1.7ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 265 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 265], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) 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" = 265 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yqgNePcmLmJlmJMRyuJTawkUyCgZDBj8ttdOQzJm2Crg' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["target_id", 265], ["target_type", "User"], ["token", "yqgNePcmLmJlmJMRyuJTawkUyCgZDBj8ttdOQzJm2Crg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"yqgNePcmLmJlmJMRyuJTawkUyCgZDBj8ttdOQzJm2Crg"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yqgNePcmLmJlmJMRyuJTawkUyCgZDBj8ttdOQzJm2Crg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yqgNePcmLmJlmJMRyuJTawkUyCgZDBj8ttdOQzJm2Crg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 265]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 265) 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", Mon, 09 Feb 2015 04:35:09 UTC +00:00], ["target_id", 265], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 67 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:35:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 266 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 266], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 266 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 267 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 267], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 268 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 268], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 269 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 269], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 269 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 288 [["params", {"listing_id"=>1}], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 270 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 270], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 270 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 289 [["params", {"listing_id"=>1}], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 271], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 290 [["params", {:listing_id=>1}], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 272 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 272], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 272 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 291 [["params", {:listing_id=>1}], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 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" = 273 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 273], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 273 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 274 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 274], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 274 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 274 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 293 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 274 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 293) 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", 293]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 274]] NewPostNotification Load (0.3ms) 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" = 274 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 275 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 275], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 275 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 275], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 275 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 275 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 295 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 275 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 295)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) 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" = 276 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 276], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 276 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 276 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 296 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 296]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 276]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 276 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 276 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2hRL91prpRi2iWZwgcy4kgMGZargStzN_v_SREKUeMIQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 276], ["target_type", "User"], ["token", "2hRL91prpRi2iWZwgcy4kgMGZargStzN_v_SREKUeMIQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.7ms) Date: Mon, 09 Feb 2015 15:35:10 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54d838fe28dda_d1a93fc1b1c65be460792@Antons-MacBook-Pro.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.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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 277 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 277], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 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" = 277 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 297 [["state", "pending_no_aggregation"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 278 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 278], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 278) 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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 278], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 298]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 278]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 278 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 279 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 279], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 299]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 279]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 279 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 280], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 300 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 300]] User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 280]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 280 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dRbjmaSh7Mf2hZ5v7hGv0wvL7nKuzrtaj-jYrZoLM9_Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 280], ["target_type", "User"], ["token", "dRbjmaSh7Mf2hZ5v7hGv0wvL7nKuzrtaj-jYrZoLM9_Q"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (4.7ms) Date: Mon, 09 Feb 2015 15:35:10 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54d838fe3a15a_d1a93fc1b1c65be46088@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) 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" = 281 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 281], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 301]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 281]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 281 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 282 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 282], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 302]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 282]] NewPostNotification Load (0.3ms) 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" = 282 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 282]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 282 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 302 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 283], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) 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" = 283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 283], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 304]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 283]] 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" = 283 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 283]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 303 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 283]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 304 [["state", "sent"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 284 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 284], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 284 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KIF2fJ6hcgoJLjFab8L2lADgbPnM8J-0O015UeMa5d1A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 284], ["target_type", "User"], ["token", "KIF2fJ6hcgoJLjFab8L2lADgbPnM8J-0O015UeMa5d1A"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 285], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 285 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'X_vKuFZe0XQQSPbt8egg-g5zvvFHwelQ4aG0akpm_ETA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 285], ["target_type", "User"], ["token", "X_vKuFZe0XQQSPbt8egg-g5zvvFHwelQ4aG0akpm_ETA"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 285 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 286 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["state", "pending"], ["target_id", 286], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 286 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KZtXsHsoTtwoNgihEN4YCAWaAegb2yelVuoxGywYFheQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 286], ["target_type", "User"], ["token", "KZtXsHsoTtwoNgihEN4YCAWaAegb2yelVuoxGywYFheQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 72 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 286 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qi8q4IczavKFooJhJXzOXgHURxdVW63d3ZJjH77PsWPw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 286], ["target_type", "User"], ["token", "qi8q4IczavKFooJhJXzOXgHURxdVW63d3ZJjH77PsWPw"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 287) 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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 287], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 54 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 287) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 287 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 288) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 288], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 55 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 288) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 288 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 289) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 289], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 56 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 289) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 289) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 289 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 289 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 56]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 289 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 290 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", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 290], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.8ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_DVIY4Adsy0HFCWApVO6TQZHGlQRZkD_K94AulEOh1IA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 291], ["target_type", "User"], ["token", "_DVIY4Adsy0HFCWApVO6TQZHGlQRZkD_K94AulEOh1IA"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_DVIY4Adsy0HFCWApVO6TQZHGlQRZkD_K94AulEOh1IA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Q4gwiCHLAJDhGzffo6aqdAHQq92_hE6ZU-_bwabkw9vg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 292], ["target_type", "User"], ["token", "Q4gwiCHLAJDhGzffo6aqdAHQq92_hE6ZU-_bwabkw9vg"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 75 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Q4gwiCHLAJDhGzffo6aqdAHQq92_hE6ZU-_bwabkw9vg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lvkeGm33T0lXkdpd7WujVARs7mPEGVzEAQuR0JACmYMQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 293], ["target_type", "User"], ["token", "lvkeGm33T0lXkdpd7WujVARs7mPEGVzEAQuR0JACmYMQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 76 [["active", false], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) 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" = 'q7SShkne5P-53rF9deW9wwyeHCrgzcXxBzpijBwa2IJw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00], ["target_id", 294], ["target_type", "User"], ["token", "q7SShkne5P-53rF9deW9wwyeHCrgzcXxBzpijBwa2IJw"], ["type", "NewPostNotification"], ["updated_at", Mon, 09 Feb 2015 04:35:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (50.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (15.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 296 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (3.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 296], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 296 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (20.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 296 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 37ms (Views: 11.7ms | ActiveRecord: 20.7ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 297 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 297], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 297 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 297], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 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" = 297 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 297], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 297 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 72ms (Views: 70.8ms | ActiveRecord: 0.5ms)  (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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 298 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 298], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 298 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 298], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 298 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 298], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"313"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 298 AND "notify_user_notifications"."target_type" = 'User' AND (id = '313') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 298]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 298 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 313 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 16ms (Views: 1.6ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 313 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.4ms) 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 299], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 299 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 299], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 299], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"316"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 299 AND "notify_user_notifications"."target_type" = 'User' AND (id = '316') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 299]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 316 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"316"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 299 AND "notify_user_notifications"."target_type" = 'User' AND (id = '316') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 300 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 300], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 300 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 300], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 300 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 300], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 300 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 300 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 301 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 301], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["322"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 301 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('322')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 301 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('322')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms) 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", 322]]  (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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 302 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 302], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["323"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 302 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('323')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 302 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('323')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 303 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 303], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 303 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 303 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 303) LIMIT 1 SQL (19.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["target_id", 303], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 303 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 35ms (Views: 0.4ms | ActiveRecord: 20.9ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 303 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 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" = 304 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 304], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 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" = 304 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 304 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 304 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 304 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 305 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 305], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) 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" = 305) 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", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["target_id", 305], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 305 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 306 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 306], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 306) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00], ["target_id", 306], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 306 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 59]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) 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" = 307 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 307], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (1.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 307 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'MMh06GTvLq9zqZgpcu2iUgL_qRNYyQF9m8Q_VxFXa1qw' LIMIT 1 SQL (2.0ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 307], ["target_type", "User"], ["token", "MMh06GTvLq9zqZgpcu2iUgL_qRNYyQF9m8Q_VxFXa1qw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"MMh06GTvLq9zqZgpcu2iUgL_qRNYyQF9m8Q_VxFXa1qw"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'MMh06GTvLq9zqZgpcu2iUgL_qRNYyQF9m8Q_VxFXa1qw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'MMh06GTvLq9zqZgpcu2iUgL_qRNYyQF9m8Q_VxFXa1qw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 307]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 307) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 307], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 78 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 308 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 308], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 308 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 309 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 309], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 310 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 310], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 311 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 311], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) 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" = 311 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 332 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 312 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 312], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 312 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 333 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 313], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 334 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 314 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 314], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 314 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 335 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 315 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 315], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 315 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 316 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 316], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 316 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 316 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 337 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 316 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 337) 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", 337]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 316]] NewPostNotification Load (0.3ms) 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" = 316 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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" = 317 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 317], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 317 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 317], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 317 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 317 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 339 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 317 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 339)  (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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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" = 318 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 318], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 318 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 318 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 340 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 340]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 318]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 318 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" = 318 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'P0mRNY-6wrGVL6oBvfo81Q9RrFWzhg6Y6c1nYfRsaKrw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 318], ["target_type", "User"], ["token", "P0mRNY-6wrGVL6oBvfo81Q9RrFWzhg6Y6c1nYfRsaKrw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.1ms) Date: Thu, 05 Mar 2015 16:00:12 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e2dc3efc3_a5233fff55c65be487759@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 319 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 319], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 319 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 341 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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" = 320 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 320], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 320) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 320], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 342]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 320]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 320 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 321 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 321], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 343]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 321]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 321 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 322], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 322 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" = 322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 344 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) 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", 344]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 322]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 322 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pcjtiUvGNYFhWrEx8iRWXQXP78zvx5Yb-XRg81XKTCmQ' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 322], ["target_type", "User"], ["token", "pcjtiUvGNYFhWrEx8iRWXQXP78zvx5Yb-XRg81XKTCmQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.0ms) Date: Thu, 05 Mar 2015 16:00:12 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e2dc5007f_a5233fff55c65be48781d@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 323 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 323], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 345]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 323]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 323 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 324 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 324], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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", 346]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 324]] 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" = 324 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 324]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 324 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 346 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 325 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 325], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 325 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 325], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 348]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 325]] NewPostNotification Load (0.3ms) 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" = 325 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 325]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 325 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 347 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 325]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 325 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 348 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 326 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 326], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 326 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'aOlz_JEFNQt6g7U0Fhh7MA3mUwIi-RiXnJsUYoGxrx4w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 326], ["target_type", "User"], ["token", "aOlz_JEFNQt6g7U0Fhh7MA3mUwIi-RiXnJsUYoGxrx4w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 327 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 327], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 327 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vO_o2SHGQ0qqfVOUt0jrYwK1rlSJgDExvsr4gNBgfW6g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 327], ["target_type", "User"], ["token", "vO_o2SHGQ0qqfVOUt0jrYwK1rlSJgDExvsr4gNBgfW6g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 327 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 328 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["state", "pending"], ["target_id", 328], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 328 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'a1lDJ_MMAuWfjtybc1didAeBajT3dYz-C6ediXAU6Lwg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 328], ["target_type", "User"], ["token", "a1lDJ_MMAuWfjtybc1didAeBajT3dYz-C6ediXAU6Lwg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 83 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 328 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gYXJMPeqQjFEXf_mRwJL_QpCR-EBBO9Q2hius6259Xjg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 328], ["target_type", "User"], ["token", "gYXJMPeqQjFEXf_mRwJL_QpCR-EBBO9Q2hius6259Xjg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 329) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 329], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 62 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 329) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 329 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 330) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 330], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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"."id" != 63 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 330) 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" = 330 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.7ms) BEGIN  (0.9ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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" = 331) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 331], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 64 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 331) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 331) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 331 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 331 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 64]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (1.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 331 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (1.6ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 332 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 332], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 's9-O4Vqqc4YiciusZSUN0QpH_YO-SzXLa3sI90UAoKpg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 333], ["target_type", "User"], ["token", "s9-O4Vqqc4YiciusZSUN0QpH_YO-SzXLa3sI90UAoKpg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 's9-O4Vqqc4YiciusZSUN0QpH_YO-SzXLa3sI90UAoKpg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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" = 'zuMnos4CI-j1dB6PVwNZmQRjPx3nFU3521Wl0XykcKPA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 334], ["target_type", "User"], ["token", "zuMnos4CI-j1dB6PVwNZmQRjPx3nFU3521Wl0XykcKPA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 86 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zuMnos4CI-j1dB6PVwNZmQRjPx3nFU3521Wl0XykcKPA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tXXloaqtM4opCdj-J17wLghcMk2KbyuEqrRhIHar6d5w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 335], ["target_type", "User"], ["token", "tXXloaqtM4opCdj-J17wLghcMk2KbyuEqrRhIHar6d5w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 87 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:00:12 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" = 'lvYe6RcOCY7Jtd9C3UkvnAaRWv8M4NAXcr6kWooJ544A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00], ["target_id", 336], ["target_type", "User"], ["token", "lvYe6RcOCY7Jtd9C3UkvnAaRWv8M4NAXcr6kWooJ544A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:00:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (5.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 15ms (Views: 12.1ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:45 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" = 338 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 338], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 338 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 338 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 13ms (Views: 7.9ms | ActiveRecord: 1.2ms)  (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", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 339 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 339 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 339 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", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 339 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 36ms (Views: 34.2ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00]]  (0.1ms) 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" = 340 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:45 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" = 340 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 340 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"357"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 340 AND "notify_user_notifications"."target_type" = 'User' AND (id = '357') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 340]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 340 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 357 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 1.6ms | ActiveRecord: 2.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 357 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 341 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 341], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 341 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 341], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) 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" = 341 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 341], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"360"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 341 AND "notify_user_notifications"."target_type" = 'User' AND (id = '360') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 341]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 341 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 360 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.1ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"360"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 341 AND "notify_user_notifications"."target_type" = 'User' AND (id = '360') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 342 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 342], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 342 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 342], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 342 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 342], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 342 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 342 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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" = 343 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 343], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["366"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 343 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('366')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 343 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('366')) Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.8ms) 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", 366]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 344 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 344], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["367"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 344 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('367')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 344 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('367')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 345 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 345], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 345 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 345 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 345) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 345], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 345 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 2.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 345 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 346 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 346], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 346 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 346 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 346 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 346 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 347 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 347], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.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" = 347) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 347], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 347 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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" = 348 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 348], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 348) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 348], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 348 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 67]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 349 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 349], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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" = 349 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3j9KlY9ZTa9ytlP3QYnLGgmO9ZMXdbVXV275gIzm8ayg' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 349], ["target_type", "User"], ["token", "3j9KlY9ZTa9ytlP3QYnLGgmO9ZMXdbVXV275gIzm8ayg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"3j9KlY9ZTa9ytlP3QYnLGgmO9ZMXdbVXV275gIzm8ayg"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3j9KlY9ZTa9ytlP3QYnLGgmO9ZMXdbVXV275gIzm8ayg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3j9KlY9ZTa9ytlP3QYnLGgmO9ZMXdbVXV275gIzm8ayg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 349]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 349) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 349], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 89 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) 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 (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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 350 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 350], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 350 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 351 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 351], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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" = 352 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 352], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 353 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 353], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 353 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 376 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 354 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 354], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 354 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 377 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:10:46 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 355 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 355], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 355 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 378 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 356 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 356], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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" = 356 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 379 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 357], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 358 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 358], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 358 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 358 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 381 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 358 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 381) 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", 381]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 358]] NewPostNotification Load (0.3ms) 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" = 358 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) 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" = 359 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 359], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 359 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 359], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 359 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 359 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 383 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 359 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 383)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 360 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 360], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 360 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 360 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 384 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 384]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 360]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 360 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 360 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3Uu-TZWIdRTuop10Uwp-AAIPpT09ac0-6RWe4GttJ5pw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 360], ["target_type", "User"], ["token", "3Uu-TZWIdRTuop10Uwp-AAIPpT09ac0-6RWe4GttJ5pw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.7ms) Date: Thu, 05 Mar 2015 16:10:46 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e5566e59c_abf73fce44465be83747@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 361 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 361], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 361 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 385 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 362 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 362], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 362) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 362], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 386]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 362]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 362 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 363 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 363], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 387]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 363]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 363 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 364 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 364], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 364 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 364 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 388 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 388]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 364]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 364 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 364 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'j0NK6Y-HRN1hfM5J73OZpAies7-GMKOex0t-GIhRBCFg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 364], ["target_type", "User"], ["token", "j0NK6Y-HRN1hfM5J73OZpAies7-GMKOex0t-GIhRBCFg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.2ms) Date: Thu, 05 Mar 2015 16:10:46 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e5567e218_abf73fce44465be838f9@Antons-MacBook-Pro.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.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 365 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 365], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 389]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 365]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 365 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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" = 366 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 366], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 390]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 366]] 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" = 366 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 366]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 366 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 390 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 367], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 367], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 392]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 367]] NewPostNotification Load (0.3ms) 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" = 367 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 367]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 391 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 367]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 392 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 368 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 368], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 368 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yzeMXf0hnO7GUJ51JEul_Q7cDHUcjSbLPBnefu1JP8XA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 368], ["target_type", "User"], ["token", "yzeMXf0hnO7GUJ51JEul_Q7cDHUcjSbLPBnefu1JP8XA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 369 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 369], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 369 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'CNSpQlvYe4caE7zD7jbXLgoR-sWnGKJOF5b6rNwYYosQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 369], ["target_type", "User"], ["token", "CNSpQlvYe4caE7zD7jbXLgoR-sWnGKJOF5b6rNwYYosQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 369 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 370 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["state", "pending"], ["target_id", 370], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 370 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zv8BFD9d9C4SiFkgNUwqgg60rreYy9_F590iEASWpNJg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 370], ["target_type", "User"], ["token", "zv8BFD9d9C4SiFkgNUwqgg60rreYy9_F590iEASWpNJg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 94 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 370 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nxa2_8fSVLrEPEtQQ70riwVJC0SJFnbqwvL5102OceOg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 370], ["target_type", "User"], ["token", "nxa2_8fSVLrEPEtQQ70riwVJC0SJFnbqwvL5102OceOg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 371) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 371], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 70 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 371) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 371 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 372) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 372], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 71 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 372) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 372 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.1ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 373) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 373], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 72 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 373) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 373) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 373 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 373 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 72]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 373 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 374 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 374], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) 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" = 'H2_fAtdyalKASlO4Nbx8iAfZbN21UzEM03ljTynwY7WA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 375], ["target_type", "User"], ["token", "H2_fAtdyalKASlO4Nbx8iAfZbN21UzEM03ljTynwY7WA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'H2_fAtdyalKASlO4Nbx8iAfZbN21UzEM03ljTynwY7WA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) 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" = 'Nkumpz1o3Rq9lhMvzrHNUwSVf5nK4ZwLk746F07WuV4g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 376], ["target_type", "User"], ["token", "Nkumpz1o3Rq9lhMvzrHNUwSVf5nK4ZwLk746F07WuV4g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 97 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Nkumpz1o3Rq9lhMvzrHNUwSVf5nK4ZwLk746F07WuV4g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Y0H-Nh4dh0afGiHUoA1ekwcuoiX1-OiZdVpGnDFJomFg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 377], ["target_type", "User"], ["token", "Y0H-Nh4dh0afGiHUoA1ekwcuoiX1-OiZdVpGnDFJomFg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 98 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00]]  (0.1ms) 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" = 'aavcx2hxrjAbmMiNoVhldwtNoVO8FgFXhSUuYbF9VgOw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:10:46 UTC +00:00], ["target_id", 378], ["target_type", "User"], ["token", "aavcx2hxrjAbmMiNoVhldwtNoVO8FgFXhSUuYbF9VgOw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:10:46 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.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 12ms (Views: 9.6ms | ActiveRecord: 0.0ms)  (0.4ms) 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) 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" = 380 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 380], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 380 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 380 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.4ms | ActiveRecord: 1.2ms)  (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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 381 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 381 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 25ms (Views: 23.2ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 382 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 382 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 382 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"401"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 382 AND "notify_user_notifications"."target_type" = 'User' AND (id = '401') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 382]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 382 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 401 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.3ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 401 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 383 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 383 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 383 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"404"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 383 AND "notify_user_notifications"."target_type" = 'User' AND (id = '404') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 383]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 383 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 404 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.2ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"404"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 383 AND "notify_user_notifications"."target_type" = 'User' AND (id = '404') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.6ms)  (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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 384 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 384 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 384 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 384 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 384 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 385 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 385], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["410"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 385 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('410')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 385 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('410')) Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.6ms) 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", 410]]  (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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 386 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 386], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["411"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 386 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('411')) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 386 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('411')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.9ms)  (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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 387 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 387], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 387 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 387 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 387) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["target_id", 387], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 387 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 387 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 388 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 388], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 388 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 388 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 388 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.8ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 388 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 389 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 389], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 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.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" = 389) 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["target_id", 389], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 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" = 389 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 6ms (ActiveRecord: 1.6ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 390 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 390], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 390) 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["target_id", 390], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 390 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 75]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 391 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 391], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 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" = 391 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_gRjnLeooAZmIdKFuAAh0w0WY3nBjEi9uKyOk3_Q2-vA' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["target_id", 391], ["target_type", "User"], ["token", "_gRjnLeooAZmIdKFuAAh0w0WY3nBjEi9uKyOk3_Q2-vA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"_gRjnLeooAZmIdKFuAAh0w0WY3nBjEi9uKyOk3_Q2-vA"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_gRjnLeooAZmIdKFuAAh0w0WY3nBjEi9uKyOk3_Q2-vA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_gRjnLeooAZmIdKFuAAh0w0WY3nBjEi9uKyOk3_Q2-vA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 391]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 391) 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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["target_id", 391], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 100 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 3.6ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 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" = 392 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 392], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 392 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 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" = 393 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 393], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 394 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 394], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 395 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 395], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 395 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 420 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) 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.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", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 396 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 396], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 396 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 421 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) 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.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 397 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 397], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 397 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 422 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:15 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:15 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" = 398 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00], ["state", "pending"], ["target_id", 398], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 398 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 423 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:15 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') 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 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" = 399 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 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" = 399 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 400], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 425 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 400 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 425) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 425]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 400]] 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" = 400 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 427 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 401 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 427)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) 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" = 402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (1.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 428 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.4ms) 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", 428]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 402]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 402 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" = 402 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Bcssj85mYtlq1Qdrw_mWDAdPsycZLtujqW2pq04chHqg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 402], ["target_type", "User"], ["token", "Bcssj85mYtlq1Qdrw_mWDAdPsycZLtujqW2pq04chHqg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.1ms) Date: Thu, 05 Mar 2015 16:11:16 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e57415413_ae113fc484c15bdc25510@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 403 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 403], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 403 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 429 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 404 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 404], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 404) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 404], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 430]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 404]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 404 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 405], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 431]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 405]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 405 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 406], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 432 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 432]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 406]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 406 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ozbMJu8E_mIyC0UAp4v-rQ5SAw26_2vPPWXFzeqXryMw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 406], ["target_type", "User"], ["token", "ozbMJu8E_mIyC0UAp4v-rQ5SAw26_2vPPWXFzeqXryMw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.6ms) Date: Thu, 05 Mar 2015 16:11:16 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e57425033_ae113fc484c15bdc2566b@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 407 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 407], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 433]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 407]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 407 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 408 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 408], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 434]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 408]] NewPostNotification Load (0.3ms) 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" = 408 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 408]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 408 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 434 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) 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" = 409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 409], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 409], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 436]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 409]] NewPostNotification Load (0.7ms) 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" = 409 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 409]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 435 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 409]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 436 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 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" = 410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 410], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 410 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VURUZ9jNCROx9f8syFQjxAxDfvHIkWGizoEZs-2EtuJw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 410], ["target_type", "User"], ["token", "VURUZ9jNCROx9f8syFQjxAxDfvHIkWGizoEZs-2EtuJw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 411 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 411], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 411 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VOv4MnTWD52lU1J-yZ8C-w_2flUHWDNkK_NxvjXkA33Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 411], ["target_type", "User"], ["token", "VOv4MnTWD52lU1J-yZ8C-w_2flUHWDNkK_NxvjXkA33Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 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" = 411 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 412 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["state", "pending"], ["target_id", 412], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 412 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 't9nXrA7Gp_yeKx5crjZnHQSb-zKwuF9_PtvX8kO_-shw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 412], ["target_type", "User"], ["token", "t9nXrA7Gp_yeKx5crjZnHQSb-zKwuF9_PtvX8kO_-shw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 105 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 412 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Vet6p0Et5YJNutwfW2j_jAKkkjrFNjq6j6beDXokJA2A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 412], ["target_type", "User"], ["token", "Vet6p0Et5YJNutwfW2j_jAKkkjrFNjq6j6beDXokJA2A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) 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" = 413) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 413], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 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"."id" != 78 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 413) LIMIT 1  (0.1ms) 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" = 413 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.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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 414) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 414], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 79 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 414) LIMIT 1  (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" = 414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 415) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 415], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 80 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 415) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 415) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 80]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 416 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 416], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) 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" = 'UG5JGJCcu8jYttrjQk1upwzXgB2h7Np3AXXf82ckuScw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 417], ["target_type", "User"], ["token", "UG5JGJCcu8jYttrjQk1upwzXgB2h7Np3AXXf82ckuScw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UG5JGJCcu8jYttrjQk1upwzXgB2h7Np3AXXf82ckuScw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Hf84n1dsaGTMm2SNoxmpiQjHTdpZVdSKkQidARMXcidQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 418], ["target_type", "User"], ["token", "Hf84n1dsaGTMm2SNoxmpiQjHTdpZVdSKkQidARMXcidQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 108 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Hf84n1dsaGTMm2SNoxmpiQjHTdpZVdSKkQidARMXcidQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Ucc4K4iUwYqjc97UCcLBlgXqg2vKo4g0zdOb8KFkC4hQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 419], ["target_type", "User"], ["token", "Ucc4K4iUwYqjc97UCcLBlgXqg2vKo4g0zdOb8KFkC4hQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 109 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uB44L7R1W41DKnkDqLe6nwv2unLqA2r_v6jT6W1G4b7Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00], ["target_id", 420], ["target_type", "User"], ["token", "uB44L7R1W41DKnkDqLe6nwv2unLqA2r_v6jT6W1G4b7Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 10ms (Views: 8.3ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:21 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" = 422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 422], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 422 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 422 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.6ms | ActiveRecord: 1.5ms)  (0.3ms) 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", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:21 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" = 423 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 423], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 423 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 423], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 423 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", Thu, 05 Mar 2015 05:11:21 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 423], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 423 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 30ms (Views: 28.5ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 424 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 424], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 424 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 424], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 424 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 424], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"445"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 424 AND "notify_user_notifications"."target_type" = 'User' AND (id = '445') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 424]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 424 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 445 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 1.6ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 445 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"448"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 425 AND "notify_user_notifications"."target_type" = 'User' AND (id = '448') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 425]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 448 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"448"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 425 AND "notify_user_notifications"."target_type" = 'User' AND (id = '448') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 426 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 426 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 426 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 426 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 426 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 427 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 427], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["454"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 427 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('454')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 427 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('454')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms) 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", 454]]  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 428 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 428], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["455"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 428 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('455')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 428 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('455')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 429], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 429) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 429], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 429 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 430 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 430], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 430 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 430 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 430 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 430 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 431 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 431], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 431) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 431], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 431 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 432 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 432], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 432) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 432], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 432 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", 83]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 433 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 433], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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" = 433 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GqxaNTZpgD2fN6oukIWgZwDxJQJcooX6bEFiWU3ategw' LIMIT 1 SQL (0.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 433], ["target_type", "User"], ["token", "GqxaNTZpgD2fN6oukIWgZwDxJQJcooX6bEFiWU3ategw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"GqxaNTZpgD2fN6oukIWgZwDxJQJcooX6bEFiWU3ategw"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GqxaNTZpgD2fN6oukIWgZwDxJQJcooX6bEFiWU3ategw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GqxaNTZpgD2fN6oukIWgZwDxJQJcooX6bEFiWU3ategw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 433]]  (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" = 433) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 433], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 111 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 434 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 434], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 434 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 435 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 435], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 436 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 436], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 437 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 437], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 437 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 464 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 438 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 438], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 438 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 465 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 439 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 439], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 439 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 466 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 440 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 440], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 440 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 467 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 441 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 441], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 441 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 442], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 469 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 442 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 469) 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", 469]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 442]] NewPostNotification Load (0.3ms) 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" = 442 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 443], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 443], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 471 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 443 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 471)  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 444], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 472 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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", 472]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 444]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 444 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q0J7aWj8u2NRSmdpIbtpbAwF7_wciUsIbUbZsUkiFQ-g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 444], ["target_type", "User"], ["token", "q0J7aWj8u2NRSmdpIbtpbAwF7_wciUsIbUbZsUkiFQ-g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.9ms) Date: Thu, 05 Mar 2015 16:11:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e57a761fe_b0103ffdf0c65bf097715@Antons-MacBook-Pro.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.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 445 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 445], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 445 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 473 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 446 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 446], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 446) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 446], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 474]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 446]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 446 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 447 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 447], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 475]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 447]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 447 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 448 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 448], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 448 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 448 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 476 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 476]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 448]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 448 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 448 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QWNox42zL5L9TTlWGPwr2g-uJgnz5OPPw5_Fwl3ynBqw' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 448], ["target_type", "User"], ["token", "QWNox42zL5L9TTlWGPwr2g-uJgnz5OPPw5_Fwl3ynBqw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Thu, 05 Mar 2015 16:11:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e57a86f54_b0103ffdf0c65bf0978fb@Antons-MacBook-Pro.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.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 449 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 449], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 477]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 449]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 449 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 450 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 450], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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", 478]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 450]] NewPostNotification Load (0.3ms) 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" = 450 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 450]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 450 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 478 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 451], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 451], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 480]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 451]] 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" = 451 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 451]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 479 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 451]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 480 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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" = 452 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 452], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 452 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KQFheKXMTDSqv71Oy1XO1w2yD7Fn8Vuvm7cNoALw5oFA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 452], ["target_type", "User"], ["token", "KQFheKXMTDSqv71Oy1XO1w2yD7Fn8Vuvm7cNoALw5oFA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 453 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 453], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 453 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fsEmz0bqa3NzzhMvA8dyVwK7cOIJhFMrRRBve9ziZIxQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 453], ["target_type", "User"], ["token", "fsEmz0bqa3NzzhMvA8dyVwK7cOIJhFMrRRBve9ziZIxQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 453 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 454 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["state", "pending"], ["target_id", 454], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 454 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pRyyMmrt7iNqMcGLeWnd3QlAArF1A41Hyqt8KL7PWf3w' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 454], ["target_type", "User"], ["token", "pRyyMmrt7iNqMcGLeWnd3QlAArF1A41Hyqt8KL7PWf3w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 116 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 454 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KP2CODArCI7bQlorrdx2tAScp5WTFJcqaYyvNFWNN_AQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 454], ["target_type", "User"], ["token", "KP2CODArCI7bQlorrdx2tAScp5WTFJcqaYyvNFWNN_AQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 455) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 455], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 86 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 455) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 456) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 456], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 87 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 456) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 456 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 457) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 457], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 88 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 457) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 457) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 88]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 458 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 458], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gkQH6QuFGigllCmBUxcz7AFONS68QcF_ZsB-GmOs_UdQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 459], ["target_type", "User"], ["token", "gkQH6QuFGigllCmBUxcz7AFONS68QcF_ZsB-GmOs_UdQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gkQH6QuFGigllCmBUxcz7AFONS68QcF_ZsB-GmOs_UdQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZNx7wFmfHgckwpAD-9h3xg_sa1qreqfhOxTAxVMis_wg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 460], ["target_type", "User"], ["token", "ZNx7wFmfHgckwpAD-9h3xg_sa1qreqfhOxTAxVMis_wg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 119 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZNx7wFmfHgckwpAD-9h3xg_sa1qreqfhOxTAxVMis_wg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yv97jSNwTeRznESEnm2r4Qd84PbDZjYg2Sokyc6MLoDQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 461], ["target_type", "User"], ["token", "yv97jSNwTeRznESEnm2r4Qd84PbDZjYg2Sokyc6MLoDQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 120 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:11:22 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" = 'kZofCxQBYS6HJ0-VNseB1gCq5a6uSdd8q_5DDzLSZucA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00], ["target_id", 462], ["target_type", "User"], ["token", "kZofCxQBYS6HJ0-VNseB1gCq5a6uSdd8q_5DDzLSZucA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:11:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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" = 464 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 464], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 464 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 464 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.6ms | ActiveRecord: 1.1ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 465 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 465], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 465 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 465], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 465 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 465], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 465 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 22ms (Views: 21.0ms | ActiveRecord: 0.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 466 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 466], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 466 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 466], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 466 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 466], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"489"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 466 AND "notify_user_notifications"."target_type" = 'User' AND (id = '489') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 466]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 466 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 489 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 489 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 467 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 467], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 467 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 467], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 467 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 467], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"492"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 467 AND "notify_user_notifications"."target_type" = 'User' AND (id = '492') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 467]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 467 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 492 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.2ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"492"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 467 AND "notify_user_notifications"."target_type" = 'User' AND (id = '492') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 468 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 468], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 468 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 468], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 468 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 468], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 468 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 468 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 469 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 469], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["498"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 469 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('498')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 469 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('498')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.8ms) NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 498]]  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 470 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 470], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["499"]} SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 470 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('499')) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 470 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('499')) Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 1.3ms)  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.3ms) 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" = 471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 471], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 471 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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 471) LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 471], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 2.5ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 471 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 472 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 472], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 472 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 472 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 472 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.8ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 472 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 473 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 473], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 473) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 473], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 473 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 474 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 474], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 474) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 474], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 474 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 91]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 475 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 475], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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" = 475 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z81cZX2mo1ctIFLGJWpOWA-hRApial8mSm5LNMj65ihw' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 475], ["target_type", "User"], ["token", "z81cZX2mo1ctIFLGJWpOWA-hRApial8mSm5LNMj65ihw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"z81cZX2mo1ctIFLGJWpOWA-hRApial8mSm5LNMj65ihw"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z81cZX2mo1ctIFLGJWpOWA-hRApial8mSm5LNMj65ihw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z81cZX2mo1ctIFLGJWpOWA-hRApial8mSm5LNMj65ihw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 475]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 475) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 475], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 122 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 476 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 476], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 476 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 477 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 477], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 478 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 478], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 479 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 479], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 479 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 508 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:13:48 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 480 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 480], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 480 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 509 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 481 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 481], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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" = 481 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 510 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:13:48 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.1ms) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 482 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 482], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 482 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 511 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 483 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 483], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 483 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 484 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 484], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 484 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 484 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 513 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 484 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 513) 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", 513]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 484]] 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" = 484 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 485], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 485], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 515 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 485 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 515)  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 486], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 516 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 516]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 486]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 486 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OfjR82upbmQzPvrW15E9hgvbdAQ-jqcDk0rQPz0Sx1Lg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 486], ["target_type", "User"], ["token", "OfjR82upbmQzPvrW15E9hgvbdAQ-jqcDk0rQPz0Sx1Lg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.8ms) Date: Thu, 05 Mar 2015 16:13:48 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e60c903be_b67f3ffa62065be83518@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 487 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 487], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 487 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (2.4ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 517 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 488 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 488], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 488) 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 488], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 518]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 488]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 488 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 489 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 489], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 519]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 489]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 489 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 490 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 490], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 490 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 490 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 520 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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", 520]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 490]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 490 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 490 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'epV1ywx12xIKnfBnQ5yd4w4V_PULjWwAxka6FXbvoADg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 490], ["target_type", "User"], ["token", "epV1ywx12xIKnfBnQ5yd4w4V_PULjWwAxka6FXbvoADg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.0ms) Date: Thu, 05 Mar 2015 16:13:48 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e60ca2b6e_b67f3ffa62065be83655@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 491 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 491], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 521]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 491]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 491 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 492 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 492], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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", 522]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 492]] 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" = 492 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 492]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 492 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 522 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 493 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 493], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 493 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 493], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 524]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 493]] 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" = 493 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 493]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 493 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 523 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 493]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 493 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 524 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 494 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 494], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 494 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Zgo61yJbhaFOvL07e4Z-rAlhPlyhvKNk6ApyddSS79MQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 494], ["target_type", "User"], ["token", "Zgo61yJbhaFOvL07e4Z-rAlhPlyhvKNk6ApyddSS79MQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 495 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 495], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 495 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SvJk84Y_PXnGZS3v9HcXsw9DV-AXEVeADsY1mpdJSpfw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 495], ["target_type", "User"], ["token", "SvJk84Y_PXnGZS3v9HcXsw9DV-AXEVeADsY1mpdJSpfw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 495 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 496 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["state", "pending"], ["target_id", 496], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 496 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VrftQffBQL4CISbDyy95QA--8jpkrxDmBblK-ZZ_tesA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 496], ["target_type", "User"], ["token", "VrftQffBQL4CISbDyy95QA--8jpkrxDmBblK-ZZ_tesA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 127 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 496 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tgM-X4K4XIcrUFJvHy9hwAwVAAZ5SZsAd8CYramBZFuQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 496], ["target_type", "User"], ["token", "tgM-X4K4XIcrUFJvHy9hwAwVAAZ5SZsAd8CYramBZFuQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 497) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 497], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 94 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 497) LIMIT 1  (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" = 497 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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 498) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 498], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 95 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 498) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 498 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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" = 499) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 499], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 96 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 499) LIMIT 1  (0.1ms) 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" = 499) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 96]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 500 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 500], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'T4vYM15lLthm1xFWsPJcrQAP6sUb38p0GxznT19KXsgQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 501], ["target_type", "User"], ["token", "T4vYM15lLthm1xFWsPJcrQAP6sUb38p0GxznT19KXsgQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'T4vYM15lLthm1xFWsPJcrQAP6sUb38p0GxznT19KXsgQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9F6PQyDt052ogtAoECL7ZQw_4_kbGkm-rkcNZz7M2VGA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 502], ["target_type", "User"], ["token", "9F6PQyDt052ogtAoECL7ZQw_4_kbGkm-rkcNZz7M2VGA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 130 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9F6PQyDt052ogtAoECL7ZQw_4_kbGkm-rkcNZz7M2VGA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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" = 'UWznix8PuV-7BRaY21m9MAd7gR-zjGFSY-DBB9URSayw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 503], ["target_type", "User"], ["token", "UWznix8PuV-7BRaY21m9MAd7gR-zjGFSY-DBB9URSayw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 131 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) 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" = '6xKfx9AYeJtyGqmuiGF3yQfyTNzjjfBbYLnsk-fItGOA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00], ["target_id", 504], ["target_type", "User"], ["token", "6xKfx9AYeJtyGqmuiGF3yQfyTNzjjfBbYLnsk-fItGOA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:13:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) 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" = 506 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 506], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 506 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 506 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 18ms (Views: 10.1ms | ActiveRecord: 1.5ms)  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 507 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 507], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (30.4ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 507 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 507], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 507 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 507], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 507 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 22ms (Views: 20.6ms | ActiveRecord: 0.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 508 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 508], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 508 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 508], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 508 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 508], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"533"} NotifyUser::BaseNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 508 AND "notify_user_notifications"."target_type" = 'User' AND (id = '533') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 508]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 508 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 533 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 1.1ms | ActiveRecord: 3.3ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 533 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 509 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 509], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 509 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 509], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 509 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 509], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"536"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 509 AND "notify_user_notifications"."target_type" = 'User' AND (id = '536') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 509]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 509 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 536 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"536"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 509 AND "notify_user_notifications"."target_type" = 'User' AND (id = '536') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 510 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 510], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 510 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 510], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 510 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 510], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 510 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 510 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 511 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 511], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["542"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 511 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('542')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 511 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('542')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms) NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 542]]  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 512 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 512], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["543"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 512 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('543')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 512 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('543')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 513 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 513], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 513 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 513 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 513) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 513], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 513 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 2.4ms) NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 513 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 514 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 514], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 514 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 515 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 515], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) 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" = 515) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 515], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 515 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 6ms (ActiveRecord: 1.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 516 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 516], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 516) 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 516], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 516 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 99]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 517 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 517], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 517 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Umste3NldIOT_9E3mOhjwwCn0ypZtxb9JjeR0rJUd9sA' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 517], ["target_type", "User"], ["token", "Umste3NldIOT_9E3mOhjwwCn0ypZtxb9JjeR0rJUd9sA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"Umste3NldIOT_9E3mOhjwwCn0ypZtxb9JjeR0rJUd9sA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Umste3NldIOT_9E3mOhjwwCn0ypZtxb9JjeR0rJUd9sA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Umste3NldIOT_9E3mOhjwwCn0ypZtxb9JjeR0rJUd9sA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 517]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 517) 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 517], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 133 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 518 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 518], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 518 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 519 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 519], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 520 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 520], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 521 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 521], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 521 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 552 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 522 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 522], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 522 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 553 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 523 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 523], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 523 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 554 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 524 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 524], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 524 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 555 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) 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.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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 525 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 525 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 526 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 526], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 526 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 526 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 557 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 526 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 557) 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", 557]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 526]] 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" = 526 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 527 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 527 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 527 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 527 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 559 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 527 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 559)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 560 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 560]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 528]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 528 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yGj3sCCFqfrKGRBYAyNI7wnp1u2YKdEe7fADr1ZvHjXg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 528], ["target_type", "User"], ["token", "yGj3sCCFqfrKGRBYAyNI7wnp1u2YKdEe7fADr1ZvHjXg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.2ms) Date: Thu, 05 Mar 2015 16:14:47 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e647c64a5_b8ab3fff6dc65be019410@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 529 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 529], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 529 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 561 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 530 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 530], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 530) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 530], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 562]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 530]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 530 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 531], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 563]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 531]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) 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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 532], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 564 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 564]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 532]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 532 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Y-Gfg5L5ZgeLmywxQxQrfA4a-NfDmMSk-k8p4tjq3DCg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 532], ["target_type", "User"], ["token", "Y-Gfg5L5ZgeLmywxQxQrfA4a-NfDmMSk-k8p4tjq3DCg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.3ms) Date: Thu, 05 Mar 2015 16:14:47 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e647d6c1e_b8ab3fff6dc65be0195d6@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 533 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 533], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 565]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 533]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 533 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 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" = 534 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 534], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 566]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 534]] NewPostNotification Load (0.3ms) 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" = 534 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 534]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 534 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 566 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 568]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 535]] NewPostNotification Load (0.3ms) 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" = 535 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 535]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 567 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 535]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 568 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 536 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 536], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 536 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xSBWPDFb4CBnc8BE7yGQ5AM_Nbonw9F2AR-npHFLL-Vw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 536], ["target_type", "User"], ["token", "xSBWPDFb4CBnc8BE7yGQ5AM_Nbonw9F2AR-npHFLL-Vw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 537 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 537], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 537 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KMnCK39NNNQmW0QnQqUC-QahMVOHdFggCSUac53ZF6IA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 537], ["target_type", "User"], ["token", "KMnCK39NNNQmW0QnQqUC-QahMVOHdFggCSUac53ZF6IA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 537 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 538 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["state", "pending"], ["target_id", 538], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 538 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1TxSqLp-z5INbkp4rzWP_gQ0Mc2_6AKn9z33ymxyMexQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 538], ["target_type", "User"], ["token", "1TxSqLp-z5INbkp4rzWP_gQ0Mc2_6AKn9z33ymxyMexQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 138 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 538 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'j2d1qo8f67uN-dsx9CUPEw9pEsxFV7BgQwbMvV2C4Ixg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 538], ["target_type", "User"], ["token", "j2d1qo8f67uN-dsx9CUPEw9pEsxFV7BgQwbMvV2C4Ixg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 539) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 539], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 539) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 539 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 540) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 540], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 103 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 540) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 540 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 541) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00], ["target_id", 541], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 541) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 541) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 104]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 542], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:48 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" = 'PKq83gtyZ37T80TgcChrGwp_gMKNPb0zW823oUz1MIdg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["target_id", 543], ["target_type", "User"], ["token", "PKq83gtyZ37T80TgcChrGwp_gMKNPb0zW823oUz1MIdg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PKq83gtyZ37T80TgcChrGwp_gMKNPb0zW823oUz1MIdg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'h7VmbLQRBpRHalN1HG7eyASEK7h0o8jCxaHt77RncAWw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["target_id", 544], ["target_type", "User"], ["token", "h7VmbLQRBpRHalN1HG7eyASEK7h0o8jCxaHt77RncAWw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 141 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'h7VmbLQRBpRHalN1HG7eyASEK7h0o8jCxaHt77RncAWw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TSL4EOMePJ4-frQ2B2eo6AYc-VSHV-8h_ltqpnyLDf4A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["target_id", 545], ["target_type", "User"], ["token", "TSL4EOMePJ4-frQ2B2eo6AYc-VSHV-8h_ltqpnyLDf4A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 142 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LPtD-n7UY_NuQ5l_vo5FNgU7ASnK2oNOMlf3Y_EygWsg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00], ["target_id", 546], ["target_type", "User"], ["token", "LPtD-n7UY_NuQ5l_vo5FNgU7ASnK2oNOMlf3Y_EygWsg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:14:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) 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  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (6.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 21ms (Views: 15.6ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 548 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 548], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 548 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 548 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 42ms (Views: 34.8ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 549], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 549], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 549 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 549], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 549 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 34ms (Views: 33.1ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 550 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 550], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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" = 550 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 550], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 550 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 550], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"577"} NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 550 AND "notify_user_notifications"."target_type" = 'User' AND (id = '577') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 550]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 550 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 577 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 23ms (Views: 1.5ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 577 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (1.0ms) 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" = 551 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 551 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"580"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 551 AND "notify_user_notifications"."target_type" = 'User' AND (id = '580') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 551]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 580 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.1ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"580"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 551 AND "notify_user_notifications"."target_type" = 'User' AND (id = '580') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 552 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 552], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 552 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 552], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 552 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 552], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 552 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 552 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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" = 553 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 553], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["586"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 553 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('586')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 553 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('586')) Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.6ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 586]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 554 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 554], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["587"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 554 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('587')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 554 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('587')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 555], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 555) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 555], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 556 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 556], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 556 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 556 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 556 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 556 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 557 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 557) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 557 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 558 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 558) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 558 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 107]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 559 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 559], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 559 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4uDcvXIw9YoyOs0uGlHDNw7laBs779NpzLAGDFXSOg8g' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 559], ["target_type", "User"], ["token", "4uDcvXIw9YoyOs0uGlHDNw7laBs779NpzLAGDFXSOg8g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"4uDcvXIw9YoyOs0uGlHDNw7laBs779NpzLAGDFXSOg8g"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4uDcvXIw9YoyOs0uGlHDNw7laBs779NpzLAGDFXSOg8g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4uDcvXIw9YoyOs0uGlHDNw7laBs779NpzLAGDFXSOg8g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 559]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 559) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 559], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 144 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) 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 (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 560 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 560], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 560 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 561 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 561], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 562 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 562], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 563 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 563], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 563 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 596 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 564], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 597 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 565 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 565], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 565 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 598 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 566 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 566], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 566 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 599 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:16:54 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 567 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 567], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 567 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 568 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 568], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 568 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 568 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 601 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 568 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 601) 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", 601]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 568]] NewPostNotification Load (0.3ms) 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" = 568 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 569 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 569], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 569 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 569], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 569 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 569 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 603 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 569 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 603)  (0.1ms) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 570 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 570], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 570 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 570 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 604 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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", 604]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 570]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 570 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 570 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jFnEmJNdWIJey7pb6VBJmwYJgF7eM2YLJTiJ-z48LZsg' LIMIT 1 SQL (1.0ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 570], ["target_type", "User"], ["token", "jFnEmJNdWIJey7pb6VBJmwYJgF7eM2YLJTiJ-z48LZsg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.2ms) Date: Thu, 05 Mar 2015 16:16:54 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e6c6aeb69_bb263fefaa065bec45299@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 571 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 571 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 605 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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" = 572 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 572], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 572) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 572], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 606]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 572]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 572 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 573 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 607]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 573]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 573 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 574 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 574], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 574 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 574 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 608 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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", 608]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 574]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 574 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 574 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'o69IM7cTUWUJYraRZqDUtAYSlxBqyp8UXyLfr02a3nGA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 574], ["target_type", "User"], ["token", "o69IM7cTUWUJYraRZqDUtAYSlxBqyp8UXyLfr02a3nGA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.4ms) Date: Thu, 05 Mar 2015 16:16:54 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e6c6beb44_bb263fefaa065bec45386@Antons-MacBook-Pro.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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 575 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 575], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 609]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 575]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 575 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 576], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 610]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 576]] NewPostNotification Load (0.3ms) 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" = 576 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 576]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 610 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 577], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 577], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 612]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 577]] NewPostNotification Load (0.3ms) 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" = 577 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 577]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 611 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 577]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 612 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 578 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 578], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 578 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LDFKAWNnymmjsnPXUek1uwtNBltzPTumwuso9FzuLI9w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 578], ["target_type", "User"], ["token", "LDFKAWNnymmjsnPXUek1uwtNBltzPTumwuso9FzuLI9w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 579 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 579], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 579 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vF6BFLc0iDHv7N-_gYkaLgpyeAR6ckHfEbo-iTU2AzgQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 579], ["target_type", "User"], ["token", "vF6BFLc0iDHv7N-_gYkaLgpyeAR6ckHfEbo-iTU2AzgQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 579 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 580 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["state", "pending"], ["target_id", 580], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 580 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7umTSlAzti-JO5eewOTJugopbq2EmiWuqZHcxfN4CthA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 580], ["target_type", "User"], ["token", "7umTSlAzti-JO5eewOTJugopbq2EmiWuqZHcxfN4CthA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 149 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 580 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kr7BfWtLPsUm2GhIqOI_9QASPaT8N94h2xTNTDlWbv2w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 580], ["target_type", "User"], ["token", "kr7BfWtLPsUm2GhIqOI_9QASPaT8N94h2xTNTDlWbv2w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 581) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 581], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 581) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 581 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 582) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 582], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 582) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 582 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 583) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 583], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 583) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 583) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 583 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 583 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 112]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 583 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 584 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 584], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cmn3fKsl5Z3RlPWmjXB5ZAodpPMozUZy5UCAyUayhS7Q' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 585], ["target_type", "User"], ["token", "cmn3fKsl5Z3RlPWmjXB5ZAodpPMozUZy5UCAyUayhS7Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cmn3fKsl5Z3RlPWmjXB5ZAodpPMozUZy5UCAyUayhS7Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'K7hCB0R5JAFgFsh1CcdGxQST961lqqbaNRbkn_zyDWEg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 586], ["target_type", "User"], ["token", "K7hCB0R5JAFgFsh1CcdGxQST961lqqbaNRbkn_zyDWEg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 152 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'K7hCB0R5JAFgFsh1CcdGxQST961lqqbaNRbkn_zyDWEg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 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" = 'qjkDGlVia1a55CI939bz_QntZVc1qn-CuD7-NgyaZmQQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 587], ["target_type", "User"], ["token", "qjkDGlVia1a55CI939bz_QntZVc1qn-CuD7-NgyaZmQQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 153 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Vk0ugk4IXe906GvdlEpBawwNF-z0hRgAvbkajf_FGIBQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00], ["target_id", 588], ["target_type", "User"], ["token", "Vk0ugk4IXe906GvdlEpBawwNF-z0hRgAvbkajf_FGIBQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:16:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 15ms (Views: 11.9ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 590 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 590 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 15ms (Views: 9.0ms | ActiveRecord: 1.5ms)  (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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 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" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 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" = 591 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 591 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 41ms (Views: 40.1ms | ActiveRecord: 0.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) 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" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"621"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 592 AND "notify_user_notifications"."target_type" = 'User' AND (id = '621') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 592]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 621 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 16ms (Views: 1.6ms | ActiveRecord: 2.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 621 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"624"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 593 AND "notify_user_notifications"."target_type" = 'User' AND (id = '624') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 593]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 624 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"624"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 593 AND "notify_user_notifications"."target_type" = 'User' AND (id = '624') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 594 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 594 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 595], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["630"]} SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 595 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('630')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 595 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('630')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 630]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 596], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["631"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 596 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('631')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 596 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('631')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 597], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 597) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00], ["target_id", 597], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:17 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) 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" = 598 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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 598], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 599 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 599], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.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" = 599) 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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["target_id", 599], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 599 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 600], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 600) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["target_id", 600], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 115]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 601 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 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" = 601 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (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" = 'EoWw7-OZOPsJYvTHzwUGoAaqeA_mYdQM27qm7OiLmN0g' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["target_id", 601], ["target_type", "User"], ["token", "EoWw7-OZOPsJYvTHzwUGoAaqeA_mYdQM27qm7OiLmN0g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"EoWw7-OZOPsJYvTHzwUGoAaqeA_mYdQM27qm7OiLmN0g"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EoWw7-OZOPsJYvTHzwUGoAaqeA_mYdQM27qm7OiLmN0g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EoWw7-OZOPsJYvTHzwUGoAaqeA_mYdQM27qm7OiLmN0g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 601]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 601) 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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["target_id", 601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 155 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 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" = 602 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 602], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 602 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 603 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 603], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 604 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 604], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 605 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 605], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 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" = 605 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 640 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:18 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 606 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 606], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 606 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 641 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 607], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 642 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:18 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 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" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 643 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:18 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') ORDER BY "notify_user_notifications"."id" DESC 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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 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" = 610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 645 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 610 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 645) 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", 645]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 610]] NewPostNotification Load (0.3ms) 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" = 610 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) 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" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 647 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 611 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 647)  (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", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["state", "pending"], ["target_id", 612], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 648 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.1ms) 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", 648]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 612]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 612 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-HRfIEJFqVPo3VGSNxqCSAYa4OwY0Ee26POyId00isdg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00], ["target_id", 612], ["target_type", "User"], ["token", "-HRfIEJFqVPo3VGSNxqCSAYa4OwY0Ee26POyId00isdg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (9.6ms) Date: Thu, 05 Mar 2015 16:19:18 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e756f348a_bd793fee9d401bd822225@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 613 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 613], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 613 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 649 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 614], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 614) 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 614], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 650]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 614]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 651]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 615]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 652 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:19 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", 652]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 616]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 616 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JaJjL1QSd4u8YNF0LnqwMwyKoSsYzlNPvPaYwQ-8gjDQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 616], ["target_type", "User"], ["token", "JaJjL1QSd4u8YNF0LnqwMwyKoSsYzlNPvPaYwQ-8gjDQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.3ms) Date: Thu, 05 Mar 2015 16:19:19 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e757fb12_bd793fee9d401bd82232d@Antons-MacBook-Pro.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.4ms) 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 653]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 617]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 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", 654]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 618]] 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" = 618 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 618]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 654 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:19 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 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" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 619], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 619], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 656]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 619]] NewPostNotification Load (0.3ms) 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" = 619 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 619]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 655 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 619]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 656 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 620 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 620], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 620 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nVeAoFrbdku1baWZ7MlE8gSY8lKEhceN6SWPrCXT4O7A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 620], ["target_type", "User"], ["token", "nVeAoFrbdku1baWZ7MlE8gSY8lKEhceN6SWPrCXT4O7A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 621], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 621 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZxUtRdo9L5MJo8uc2mNhVwL-seGpypIfKHJBMNBTr0ZA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 621], ["target_type", "User"], ["token", "ZxUtRdo9L5MJo8uc2mNhVwL-seGpypIfKHJBMNBTr0ZA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 621 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["state", "pending"], ["target_id", 622], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 622 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NuKSqvF8_4_e_4gYvLt_xQ5Cj4amYBiUxE7xggtDvshw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 622], ["target_type", "User"], ["token", "NuKSqvF8_4_e_4gYvLt_xQ5Cj4amYBiUxE7xggtDvshw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 160 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 622 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Bs3Gw8mLVNSHq7XtlZo0wQpzq6VeLCMWQXv2Jb4AbOqA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 622], ["target_type", "User"], ["token", "Bs3Gw8mLVNSHq7XtlZo0wQpzq6VeLCMWQXv2Jb4AbOqA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 623) 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 623) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 623 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 624) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 624], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 624) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 624 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 625) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 625], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 625) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 625) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 625 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 625 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 120]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 625 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.7ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 626 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 626], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Na2PWDvGRlCj20RvAF8rVAzyMSa-UCNip7X-jNDIq4Vg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 627], ["target_type", "User"], ["token", "Na2PWDvGRlCj20RvAF8rVAzyMSa-UCNip7X-jNDIq4Vg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Na2PWDvGRlCj20RvAF8rVAzyMSa-UCNip7X-jNDIq4Vg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 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" = 'qHv2FYhMwvVIZfEV5x6o8gXux4hZfJcv1gIaQNUjLtJA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 628], ["target_type", "User"], ["token", "qHv2FYhMwvVIZfEV5x6o8gXux4hZfJcv1gIaQNUjLtJA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 163 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qHv2FYhMwvVIZfEV5x6o8gXux4hZfJcv1gIaQNUjLtJA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) 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" = 'yfhhg1ux7xt3zRe5zEksTgK5z01zq6GrVNvL45JaRFsQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 629], ["target_type", "User"], ["token", "yfhhg1ux7xt3zRe5zEksTgK5z01zq6GrVNvL45JaRFsQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 164 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00]]  (0.1ms) 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" = 'Yg09wdHLO12ob5kNlVw2GwDxqSJkpfbNwXxdePUMvSqA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:19 UTC +00:00], ["target_id", 630], ["target_type", "User"], ["token", "Yg09wdHLO12ob5kNlVw2GwDxqSJkpfbNwXxdePUMvSqA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:19 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.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 12ms (Views: 8.6ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) 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" = 632 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 632], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 632 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 632 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 1.2ms)  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 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" = 633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 633 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 22ms (Views: 20.7ms | ActiveRecord: 0.4ms)  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"665"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 634 AND "notify_user_notifications"."target_type" = 'User' AND (id = '665') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 634]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 665 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 665 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) 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" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"668"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 635 AND "notify_user_notifications"."target_type" = 'User' AND (id = '668') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 635]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 668 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.8ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"668"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 635 AND "notify_user_notifications"."target_type" = 'User' AND (id = '668') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.2ms)  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 636 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 636 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["674"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 637 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('674')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 637 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('674')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms) 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", 674]]  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 638 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 638], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["675"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 638 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('675')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 638 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('675')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.8ms)  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 639], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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" = 639) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["target_id", 639], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.2ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Processing by NotifyUser::NotificationsController#subscriptions as HTML Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 641) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["target_id", 641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 642) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 123]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) 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" = 643 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WRffYSLtMoJYehWotuZSlgb0EB5_fejSM6iV8gWE5eDA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["target_id", 643], ["target_type", "User"], ["token", "WRffYSLtMoJYehWotuZSlgb0EB5_fejSM6iV8gWE5eDA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"WRffYSLtMoJYehWotuZSlgb0EB5_fejSM6iV8gWE5eDA"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WRffYSLtMoJYehWotuZSlgb0EB5_fejSM6iV8gWE5eDA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WRffYSLtMoJYehWotuZSlgb0EB5_fejSM6iV8gWE5eDA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 643]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 643) LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 166 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.9ms) NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.5ms) 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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 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" = 644 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["state", "pending"], ["target_id", 644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 644 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 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" = 645 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["state", "pending"], ["target_id", 645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 646 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["state", "pending"], ["target_id", 646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:19:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:38 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" = 647 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 647 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 684 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:39 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 685 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 649 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 649], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 649 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 686 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 650], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 687 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) 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.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 651 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 651 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 689 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 652 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 689) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 689]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 652]] 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" = 652 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 691 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 653 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 691)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 692 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = $1 LIMIT 1 [["id", 692]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 654 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SOhJbtt9xOJq_7537DLeIwjH1pADQy1DTmhy1-tl5JIQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 654], ["target_type", "User"], ["token", "SOhJbtt9xOJq_7537DLeIwjH1pADQy1DTmhy1-tl5JIQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.5ms) Date: Thu, 05 Mar 2015 16:19:39 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e76b1d109_bf893fcf46057be87589a@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 693 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 656) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 656], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 694]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 656]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 657], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 695]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 657]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 658], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 696 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 696]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 658]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 658 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qHyQicUPxANtBrAtcvd7QwSWAANPGqAVSb6hUWHPgUWQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 658], ["target_type", "User"], ["token", "qHyQicUPxANtBrAtcvd7QwSWAANPGqAVSb6hUWHPgUWQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.7ms) Date: Thu, 05 Mar 2015 16:19:39 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e76b2d669_bf893fcf46057be875946@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 697]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 659]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 698]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 660]] NewPostNotification Load (0.3ms) 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" = 660 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 660]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 698 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 700]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]] 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" = 661 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 699 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 700 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 662 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'k5PdOsEugEyTF1XFJmsVHAyW2Mr2tvVSPav0iS70kC8Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 662], ["target_type", "User"], ["token", "k5PdOsEugEyTF1XFJmsVHAyW2Mr2tvVSPav0iS70kC8Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) 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" = 663 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5prOj75H8CRGqu_FcGtSnQFJLYt76fEflS9UjryjdbmA' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 663], ["target_type", "User"], ["token", "5prOj75H8CRGqu_FcGtSnQFJLYt76fEflS9UjryjdbmA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 663 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["state", "pending"], ["target_id", 664], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 664 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7ttjsHLBPJdBXeMSxkKA_QiqvH9u103p0wbKWiCseu3g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 664], ["target_type", "User"], ["token", "7ttjsHLBPJdBXeMSxkKA_QiqvH9u103p0wbKWiCseu3g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 171 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 664 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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" = 'vcUEivdaEk0YXQ7cptnj7AZAopTbbtivO_MAQubQf0Cg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 664], ["target_type", "User"], ["token", "vcUEivdaEk0YXQ7cptnj7AZAopTbbtivO_MAQubQf0Cg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 665) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 665], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 126 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 665) LIMIT 1  (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" = 665 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 666) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 127 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 666) LIMIT 1  (0.1ms) 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" = 666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 667) 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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 128 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 667) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 667) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 128]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 668 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mXmsF54QrfKaTGnKCeD5fwoH8hFMyCQkA4jyx7k2_Lpw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 669], ["target_type", "User"], ["token", "mXmsF54QrfKaTGnKCeD5fwoH8hFMyCQkA4jyx7k2_Lpw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mXmsF54QrfKaTGnKCeD5fwoH8hFMyCQkA4jyx7k2_Lpw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9muQZoKOhFZAx8d68WXUhwFaXZDwcAOpx4mi7wzc9Q_A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 670], ["target_type", "User"], ["token", "9muQZoKOhFZAx8d68WXUhwFaXZDwcAOpx4mi7wzc9Q_A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 174 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9muQZoKOhFZAx8d68WXUhwFaXZDwcAOpx4mi7wzc9Q_A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 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" = 'w2ronSeK-czsm6736zau6gECROLvmrgmTSoqDEQQ_rTA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 671], ["target_type", "User"], ["token", "w2ronSeK-czsm6736zau6gECROLvmrgmTSoqDEQQ_rTA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 175 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9z4YGBFrCvX3LZZr_qNy3w727xblmtt8uWLVKFgn1_dQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00], ["target_id", 672], ["target_type", "User"], ["token", "9z4YGBFrCvX3LZZr_qNy3w727xblmtt8uWLVKFgn1_dQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:19:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (5.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 14ms (Views: 11.4ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (1.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 674 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 674], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 674 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 674 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 16ms (Views: 9.0ms | ActiveRecord: 1.4ms)  (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 675], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 675], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 675], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 675 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 39ms (Views: 38.0ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 676 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 676], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 676 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 676], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 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" = 676 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 676], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"709"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 676 AND "notify_user_notifications"."target_type" = 'User' AND (id = '709') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 676]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 676 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 709 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 1.5ms | ActiveRecord: 2.8ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 709 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 677], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (10.1ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 677], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 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" = 677 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 677], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"712"} NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 677 AND "notify_user_notifications"."target_type" = 'User' AND (id = '712') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 677]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 712 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 2.1ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"712"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 677 AND "notify_user_notifications"."target_type" = 'User' AND (id = '712') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.6ms)  (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 678 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 678 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["718"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 679 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('718')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 679 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('718')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 718]]  (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["719"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 680 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('719')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 680 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('719')) Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.8ms)  (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 681) 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 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" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 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" = 683 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 683], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 683) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["target_id", 683], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 683 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 11ms (ActiveRecord: 2.7ms) NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 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" = 684 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 684], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 684) 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["target_id", 684], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) 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" = 684 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", 131]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.4ms) 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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.4ms) 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" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) 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" = 685 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'M2l0bCoE9NZEjZXGg73m_g_6pLcW2teu-69B-Ah21whQ' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["target_id", 685], ["target_type", "User"], ["token", "M2l0bCoE9NZEjZXGg73m_g_6pLcW2teu-69B-Ah21whQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"M2l0bCoE9NZEjZXGg73m_g_6pLcW2teu-69B-Ah21whQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'M2l0bCoE9NZEjZXGg73m_g_6pLcW2teu-69B-Ah21whQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'M2l0bCoE9NZEjZXGg73m_g_6pLcW2teu-69B-Ah21whQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 685]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 685) LIMIT 1 SQL (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", Thu, 05 Mar 2015 05:20:19 UTC +00:00], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 177 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:20:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 686], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 686 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (1.4ms) 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" = 688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (1.4ms) 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" = 689 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 689 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 728 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:20:21 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 690 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 690 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 729 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 691 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 691 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 730 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 692 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 692 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 731 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 693 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 693], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 693 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 733 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 694 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 733) 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", 733]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 694]] NewPostNotification Load (0.3ms) 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" = 694 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 735 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 695 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 735)  (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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 736 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 736]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 696]]  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 696 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'bM8Eif5GR-Srohr2sC0psg971A8YS5jckFvy129liwrQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 696], ["target_type", "User"], ["token", "bM8Eif5GR-Srohr2sC0psg971A8YS5jckFvy129liwrQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.6ms) Date: Thu, 05 Mar 2015 16:20:21 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e7955e79e_c2093fc381c65be086d0@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 697 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 697 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 737 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 698) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 698], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 738]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 698]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 699], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 739]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 740 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 740]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 700]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (1.1ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 700 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dV1NAWGIinb6fDUOUr7wiQO0xpEPy9VBBQNHNvlP7usQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 700], ["target_type", "User"], ["token", "dV1NAWGIinb6fDUOUr7wiQO0xpEPy9VBBQNHNvlP7usQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.4ms) Date: Thu, 05 Mar 2015 16:20:21 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e7956eaa6_c2093fc381c65be0874@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) 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" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 741]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 701]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 702], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 742]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 702]] 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" = 702 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 702]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 742 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 744]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 703]] 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" = 703 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 703]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 743 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 703]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 744 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.5ms) 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 704 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 704], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 704 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PwoJISfgCNJ93oNvmnvnWAYVBJm9z_jgOMILaq8e6HWQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 704], ["target_type", "User"], ["token", "PwoJISfgCNJ93oNvmnvnWAYVBJm9z_jgOMILaq8e6HWQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 705 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '44CWuFSCVgsAVtxCR7-MtA1SoriLYiJBCJ3RrPamvthw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 705], ["target_type", "User"], ["token", "44CWuFSCVgsAVtxCR7-MtA1SoriLYiJBCJ3RrPamvthw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 705 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["state", "pending"], ["target_id", 706], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.3ms) 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" = 706 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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" = '09RONMdcci8uCWNH9ObEygtbQI8oGLJz8hf4g37pnPfg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 706], ["target_type", "User"], ["token", "09RONMdcci8uCWNH9ObEygtbQI8oGLJz8hf4g37pnPfg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 182 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (1.1ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 706 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_1zGQAlMvk2OKVOr2YsyWQU9SvYb-07qoUDew5Q1btLA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 706], ["target_type", "User"], ["token", "_1zGQAlMvk2OKVOr2YsyWQU9SvYb-07qoUDew5Q1btLA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 707) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 707], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 134 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 707) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 708) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 708], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 135 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 708) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 709) 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 709], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 136 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 709) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 709) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 136]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 710], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = '1MylDN2Pu-RT07Hfv6bbcwUDxHnWTQwp0A_mW6DhkxXg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 711], ["target_type", "User"], ["token", "1MylDN2Pu-RT07Hfv6bbcwUDxHnWTQwp0A_mW6DhkxXg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1MylDN2Pu-RT07Hfv6bbcwUDxHnWTQwp0A_mW6DhkxXg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = '84FX5kc8BbeKyVWEFcpaagfxjmvjWoSEa1kVPwaD7j1g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 712], ["target_type", "User"], ["token", "84FX5kc8BbeKyVWEFcpaagfxjmvjWoSEa1kVPwaD7j1g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 185 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '84FX5kc8BbeKyVWEFcpaagfxjmvjWoSEa1kVPwaD7j1g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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" = 'LoSyF3HBBF65QcAnpG9iZAmZUfGHWNHF-GvqlIBx2Dcg' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 713], ["target_type", "User"], ["token", "LoSyF3HBBF65QcAnpG9iZAmZUfGHWNHF-GvqlIBx2Dcg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 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) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 186 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.6ms) 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" = 'ia7SxgOFyMinjqE1t2yuXAJLAsxlkE6KLUltKEXBz-Ag' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00], ["target_id", 714], ["target_type", "User"], ["token", "ia7SxgOFyMinjqE1t2yuXAJLAsxlkE6KLUltKEXBz-Ag"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:20:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (5.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 14ms (Views: 10.9ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) 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" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 716], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 716 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 716 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 46ms (Views: 39.5ms | ActiveRecord: 1.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 717 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 38ms (Views: 36.6ms | ActiveRecord: 0.5ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 718], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 718 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 718], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 718], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"753"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 718 AND "notify_user_notifications"."target_type" = 'User' AND (id = '753') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 718]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 753 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 1.7ms | ActiveRecord: 2.9ms) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 753 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.3ms) 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 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" = 719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 719], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 719 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 719], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 719 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 719], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"756"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 719 AND "notify_user_notifications"."target_type" = 'User' AND (id = '756') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 719]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 756 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"756"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 719 AND "notify_user_notifications"."target_type" = 'User' AND (id = '756') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 720 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 720], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 720 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 720], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 720 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 720], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 720 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 720 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 721 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 721], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["762"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 721 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('762')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 721 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('762')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.7ms) 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", 762]]  (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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 722 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 722], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["763"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 722 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('763')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 722 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('763')) Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.6ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 723 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 723], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.8ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 723 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 723) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["target_id", 723], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 723 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 724], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 725 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 725) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["target_id", 725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 726 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 726) 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["target_id", 726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 726 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 139]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 727 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", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 727], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) 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" = 727 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rBecnfNuKQy1FsX_ZMpXcg8kHZgLIYJMWe3GznGDRatQ' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["target_id", 727], ["target_type", "User"], ["token", "rBecnfNuKQy1FsX_ZMpXcg8kHZgLIYJMWe3GznGDRatQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"rBecnfNuKQy1FsX_ZMpXcg8kHZgLIYJMWe3GznGDRatQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rBecnfNuKQy1FsX_ZMpXcg8kHZgLIYJMWe3GznGDRatQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rBecnfNuKQy1FsX_ZMpXcg8kHZgLIYJMWe3GznGDRatQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 727]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 727) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00], ["target_id", 727], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 188 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:14 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.5ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 728 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 728], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 728 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 729 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 729], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 730 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 730], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 731], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 772 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:15 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 732 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 732], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 732 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 773 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 733 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 733], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 733 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 774 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:15 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 734 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 734], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 734 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 775 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 735 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 735], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 735 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 736 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 736], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 736 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 736 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 777 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 736 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 777) 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", 777]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 736]] NewPostNotification Load (0.3ms) 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" = 736 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 737 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 737], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 737 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 737], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 737 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 737 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 779 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 737 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 779)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 738 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 738], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 738 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 738 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 780 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 780]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 738]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 738 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" = 738 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'K32Lb8Z1CVZ2Vdl2w1fO8g9hx95tQ4e76cRekoStaJ4Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 738], ["target_type", "User"], ["token", "K32Lb8Z1CVZ2Vdl2w1fO8g9hx95tQ4e76cRekoStaJ4Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.1ms) Date: Thu, 05 Mar 2015 16:21:15 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e7cb9937e_c6ff3ff931065be81769@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) 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" = 739 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 739], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 739 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 781 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 740 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 740], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) 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" = 740) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 740], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 782]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 740]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 740 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 741 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 741], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 783]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 741]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 741 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 742 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 742], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 742 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" = 742 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 784 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 784]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 742]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 742 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 742 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vA10air34rBCE-Zy93KI5AGHbxlu5uzA0pesoRvikjMw' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 742], ["target_type", "User"], ["token", "vA10air34rBCE-Zy93KI5AGHbxlu5uzA0pesoRvikjMw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Thu, 05 Mar 2015 16:21:15 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e7cba9b84_c6ff3ff931065be81897@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 743], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 785]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 743]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 744], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 786]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 744]] NewPostNotification Load (0.3ms) 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" = 744 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 744]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 786 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 745], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 745], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 788]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 745]] 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" = 745 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 745]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 787 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 745]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 788 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 746], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 746 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '94e0KtKmvzHp20ROds68zwYyTvm0KSmeuGT7GU7__2Mg' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 746], ["target_type", "User"], ["token", "94e0KtKmvzHp20ROds68zwYyTvm0KSmeuGT7GU7__2Mg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) 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" = 747 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 747], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 747 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'I7U-cQ0js5KerG0ME-g9QQLzXgl1ioGlKsr_lB3TtEsQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 747], ["target_type", "User"], ["token", "I7U-cQ0js5KerG0ME-g9QQLzXgl1ioGlKsr_lB3TtEsQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 747 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 748 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["state", "pending"], ["target_id", 748], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 748 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4bxiOeP_kNj1NbbpXSQWZQHIqOTxu0QALTxqd1ZXxwog' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 748], ["target_type", "User"], ["token", "4bxiOeP_kNj1NbbpXSQWZQHIqOTxu0QALTxqd1ZXxwog"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 193 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 748 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'sw1dyUKK8vnfgCMsLiZRxAff5mpToEqbRHxI2GMTMu-w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 748], ["target_type", "User"], ["token", "sw1dyUKK8vnfgCMsLiZRxAff5mpToEqbRHxI2GMTMu-w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 749) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 749], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 142 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 749) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 749 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.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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) 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" = 750) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 750], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 143 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 750) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 751) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 751], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 144 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 751) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 751) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 751 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 751 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 144]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 751 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 752], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 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" = 'HxM_3T2CoE0LgEK4Mk1jzAKRlMtOWNto04G5YTpA6lGQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 753], ["target_type", "User"], ["token", "HxM_3T2CoE0LgEK4Mk1jzAKRlMtOWNto04G5YTpA6lGQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HxM_3T2CoE0LgEK4Mk1jzAKRlMtOWNto04G5YTpA6lGQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'c5Xg2cUlYT5turBAa3iwKQu4nHAFlJwoXQtzZ5B_nvsg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 754], ["target_type", "User"], ["token", "c5Xg2cUlYT5turBAa3iwKQu4nHAFlJwoXQtzZ5B_nvsg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 196 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'c5Xg2cUlYT5turBAa3iwKQu4nHAFlJwoXQtzZ5B_nvsg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WtTWGi0GpbBpffAIoCXf4wN8gJT3irJY3ai6b4R77zZA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 755], ["target_type", "User"], ["token", "WtTWGi0GpbBpffAIoCXf4wN8gJT3irJY3ai6b4R77zZA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 197 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zn94Rep-41y1dbQ9mdXRMQzetsOnv547zkmyq04njH-w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00], ["target_id", 756], ["target_type", "User"], ["token", "zn94Rep-41y1dbQ9mdXRMQzetsOnv547zkmyq04njH-w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.0ms)  (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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 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" = 758 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 758], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 758 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 758 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 15ms (Views: 8.3ms | ActiveRecord: 1.5ms)  (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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (27.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 759 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 759], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 759 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 759], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 759 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 759], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 759 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 35ms (Views: 33.5ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 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" = 760 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 760], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 760 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 760], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 760 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 760], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"797"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 760 AND "notify_user_notifications"."target_type" = 'User' AND (id = '797') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 760]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 760 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 797 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 1.3ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 797 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 761 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 761], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 761 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 761], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 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" = 761 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 761], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"800"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 761 AND "notify_user_notifications"."target_type" = 'User' AND (id = '800') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 761]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 761 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 800 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.7ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"800"} NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 761 AND "notify_user_notifications"."target_type" = 'User' AND (id = '800') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 762 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 762], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 762 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 762], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 762 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 762], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 762 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.7ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 762 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.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 763 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 763], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["806"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 763 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('806')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 763 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('806')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 806]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 764 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 764], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["807"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 764 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('807')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 764 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('807')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 765 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 765], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 765 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 765 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 765) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["target_id", 765], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 765 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 765 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 766], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 766 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.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 767 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 767], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 767) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["target_id", 767], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 767 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 768 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 768], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 768) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["target_id", 768], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 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" = 768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 147]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 769 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", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 769], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 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" = 769 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dJqpStyHhQBGr6dge8GT8QMpqJeYtP9rY4X0AT0wcSyQ' LIMIT 1 SQL (4.1ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["target_id", 769], ["target_type", "User"], ["token", "dJqpStyHhQBGr6dge8GT8QMpqJeYtP9rY4X0AT0wcSyQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"dJqpStyHhQBGr6dge8GT8QMpqJeYtP9rY4X0AT0wcSyQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dJqpStyHhQBGr6dge8GT8QMpqJeYtP9rY4X0AT0wcSyQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dJqpStyHhQBGr6dge8GT8QMpqJeYtP9rY4X0AT0wcSyQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 769]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 769) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00], ["target_id", 769], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 199 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.5ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.8ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) 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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 770 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 770], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 770 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 771 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 771], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 772], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 773 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 773], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 773 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 816 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 774 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 774], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 774 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 817 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:58 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 775 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 775], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 775 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 818 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 776], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 819 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 777], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 778], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 821 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 778 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 821) 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", 821]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 778]] 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" = 778 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 779 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 779], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 779 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 779], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 779 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 779 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 823 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 779 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 823)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 780 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 780], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 780 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 780 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 824 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 824]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 780]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 780 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 780 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vBVwhIJ_RmQVhxV-YFX2zg6R8pubCB4T8G3aUyoeFwZA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 780], ["target_type", "User"], ["token", "vBVwhIJ_RmQVhxV-YFX2zg6R8pubCB4T8G3aUyoeFwZA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.0ms) Date: Thu, 05 Mar 2015 16:21:58 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e7f62e252_cb153fff8d465bf0906b0@Antons-MacBook-Pro.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.7ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 781 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 781 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 825 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 782 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 782) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 782], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 826]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 782]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 782 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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 827]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 783]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 784], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 828 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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", 828]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 784]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 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" = 784 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dF_wqZWbiyQPRa202OxgFwN-S_U5t3ZxYk74ZsxS_vYQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 784], ["target_type", "User"], ["token", "dF_wqZWbiyQPRa202OxgFwN-S_U5t3ZxYk74ZsxS_vYQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (5.3ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.3ms) Date: Thu, 05 Mar 2015 16:21:58 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e7f6421d3_cb153fff8d465bf0907a5@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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" = 785 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 785], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 829]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 785]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 785 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 786 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 786], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 830]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 786]] NewPostNotification Load (0.3ms) 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" = 786 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 786]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 786 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 830 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 787], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 787], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 832]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 787]] NewPostNotification Load (0.3ms) 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" = 787 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 787]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 831 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 787]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 832 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 788 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 788], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 788 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2jrFKHYPquu51hsUseMazQ3LPbs0k3zEigs00gLx0o-Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 788], ["target_type", "User"], ["token", "2jrFKHYPquu51hsUseMazQ3LPbs0k3zEigs00gLx0o-Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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" = 789 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 789], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 789 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ooUapAcfDujeeEiDDKt3NAvarAlqk-xL_5wcgBBQCnoQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 789], ["target_type", "User"], ["token", "ooUapAcfDujeeEiDDKt3NAvarAlqk-xL_5wcgBBQCnoQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 789 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 790 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["state", "pending"], ["target_id", 790], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 790 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zuMTyugqxP4tqnyY2gdsBgx69p_znH6k9c9Z1ws0lGRw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 790], ["target_type", "User"], ["token", "zuMTyugqxP4tqnyY2gdsBgx69p_znH6k9c9Z1ws0lGRw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 204 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 790 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ioFlbCRO0KqzpHscpHvbBwSJk_VAuMT2Va09rGINIoiA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 790], ["target_type", "User"], ["token", "ioFlbCRO0KqzpHscpHvbBwSJk_VAuMT2Va09rGINIoiA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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" = 791) 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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 791], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 150 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 791) 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" = 791 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 792) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 792], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 151 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 792) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 792 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 793) 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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 793], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 152 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 793) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 793) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 793 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 793 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 152]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 793 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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" = 794 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 794], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'avOHCMW216sfcMQV2v4bNAebb61xNoLtu9wIQ5mTjpAQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 795], ["target_type", "User"], ["token", "avOHCMW216sfcMQV2v4bNAebb61xNoLtu9wIQ5mTjpAQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'avOHCMW216sfcMQV2v4bNAebb61xNoLtu9wIQ5mTjpAQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'x7LbuC_8Jn2ODffd94mCpQT77TztNUC1bkpCB3rz6CLQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 796], ["target_type", "User"], ["token", "x7LbuC_8Jn2ODffd94mCpQT77TztNUC1bkpCB3rz6CLQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 207 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'x7LbuC_8Jn2ODffd94mCpQT77TztNUC1bkpCB3rz6CLQ' 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 (6.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 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" = '9btGRnK5n4lInOz8A-eblgKrv8SXl4PT4zBbK6QL9rrw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 797], ["target_type", "User"], ["token", "9btGRnK5n4lInOz8A-eblgKrv8SXl4PT4zBbK6QL9rrw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 208 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'K-LCvi1OYW0NjDBRYCx9vgC5S1x3uTxNfbvmA6gBeesg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00], ["target_id", 798], ["target_type", "User"], ["token", "K-LCvi1OYW0NjDBRYCx9vgC5S1x3uTxNfbvmA6gBeesg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:21:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 800], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 800 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 800 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 14ms (Views: 8.5ms | ActiveRecord: 1.2ms)  (0.3ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 801], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 801 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 801], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 801], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 801 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 46ms (Views: 44.1ms | ActiveRecord: 0.8ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 802], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.4ms) 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" = 802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 802], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 802 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 802], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"841"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 802 AND "notify_user_notifications"."target_type" = 'User' AND (id = '841') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 802]]  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 841 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 1.4ms | ActiveRecord: 3.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 841 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.7ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 803], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 803], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 803 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 803], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"844"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 803 AND "notify_user_notifications"."target_type" = 'User' AND (id = '844') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 803]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 844 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"844"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 803 AND "notify_user_notifications"."target_type" = 'User' AND (id = '844') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.2ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 804 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 804], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) 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" = 804 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 804], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 804], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 804 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 804 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 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" = 805 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 805], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["850"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 805 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('850')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 805 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('850')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms) 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", 850]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 806 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 806], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["851"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 806 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('851')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 806 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('851')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 807], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 807) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["target_id", 807], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 15ms (Views: 0.3ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 808], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 809], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 809) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["target_id", 809], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 810 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 810], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 810) 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["target_id", 810], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 810 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 155]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.2ms) 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 811], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) 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" = 811 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lxQiFyLjoZ9R9PKea1N6yQkaX_p_0RiPObzt38qltk0A' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["target_id", 811], ["target_type", "User"], ["token", "lxQiFyLjoZ9R9PKea1N6yQkaX_p_0RiPObzt38qltk0A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"lxQiFyLjoZ9R9PKea1N6yQkaX_p_0RiPObzt38qltk0A"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lxQiFyLjoZ9R9PKea1N6yQkaX_p_0RiPObzt38qltk0A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lxQiFyLjoZ9R9PKea1N6yQkaX_p_0RiPObzt38qltk0A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 811]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 811) 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", Thu, 05 Mar 2015 05:22:53 UTC +00:00], ["target_id", 811], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 210 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:22:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.9ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 812 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 812], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 812 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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" = 813 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 813], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 814 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 814], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 815 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 815], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 815 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 860 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 816 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 816], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 816 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 861 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 817 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 817], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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" = 817 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 862 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 818 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 818], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 818 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 863 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 819 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 819], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 819 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 820 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 820], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 820 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 820 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 865 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 820 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 865) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 865]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 820]] NewPostNotification Load (0.3ms) 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" = 820 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 821 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 821], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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" = 821 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 821], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 821 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 821 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 867 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 821 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 867)  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 822 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 822], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 822 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 822 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 868 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 868]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 822]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 822 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 822 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oBQ--bpa8X4FaNL4EL5YcQXUR4Vq5-9MniKJO_oEWo7A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 822], ["target_type", "User"], ["token", "oBQ--bpa8X4FaNL4EL5YcQXUR4Vq5-9MniKJO_oEWo7A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.8ms) Date: Thu, 05 Mar 2015 16:22:54 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e82ea4940_cd813feeaa065be8677d6@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 823 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 823], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 823 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 869 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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" = 824 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 824], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 824) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 824], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 870]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 824]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 824 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 825 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 825], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 871]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 825]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 825 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 872 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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", 872]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 826]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 826 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xtUuEH-FEuUwa-8DpdudQAgaDEXdcrzXJYfWEfhpinKw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 826], ["target_type", "User"], ["token", "xtUuEH-FEuUwa-8DpdudQAgaDEXdcrzXJYfWEfhpinKw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.4ms) Date: Thu, 05 Mar 2015 16:22:54 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e82eb53c3_cd813feeaa065be8678c0@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 827 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 827], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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", 873]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 827]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 827 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 828 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 828], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 874]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 828]] NewPostNotification Load (0.3ms) 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" = 828 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 828]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 828 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 874 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 876]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 829]] 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" = 829 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 829]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 875 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 829]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 876 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 830 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 830], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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" = 830 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7RHJ8bsO0oPOL6txIBLaYQbxtE2eQaZfqg26aD4AU7wQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 830], ["target_type", "User"], ["token", "7RHJ8bsO0oPOL6txIBLaYQbxtE2eQaZfqg26aD4AU7wQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) 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" = 831 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 831], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 831 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZO5AiKX4SQoXUigePQa1qwBp7PR-4-u3F6t_d-ikXDnQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 831], ["target_type", "User"], ["token", "ZO5AiKX4SQoXUigePQa1qwBp7PR-4-u3F6t_d-ikXDnQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 831 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["state", "pending"], ["target_id", 832], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 832 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ny6UtQ_aViJPa3Z5C3vGjwl3fO3jBjFLfoCJ4cmhHANA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 832], ["target_type", "User"], ["token", "ny6UtQ_aViJPa3Z5C3vGjwl3fO3jBjFLfoCJ4cmhHANA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 215 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 832 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ISUdmVWde0cWeJOT1u0SJAcQE6QKfkieDRxD5n4VZSIQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 832], ["target_type", "User"], ["token", "ISUdmVWde0cWeJOT1u0SJAcQE6QKfkieDRxD5n4VZSIQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 833) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 833], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 158 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 833) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 833 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 834) 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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 834], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 159 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 834) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 834 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 835) 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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 835], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 160 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 835) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 835) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 835 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 835 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 160]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 835 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) 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" = 836 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 836], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 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", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) 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" = '4QqE0FSsjI0WxjS7M9sEBAxGcf4px6paog16z1MI3Hmg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 837], ["target_type", "User"], ["token", "4QqE0FSsjI0WxjS7M9sEBAxGcf4px6paog16z1MI3Hmg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4QqE0FSsjI0WxjS7M9sEBAxGcf4px6paog16z1MI3Hmg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TG1zUpFwbImVsl8lIcgn-wtlUfIxE6Y0XsF5OitNL5Aw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 838], ["target_type", "User"], ["token", "TG1zUpFwbImVsl8lIcgn-wtlUfIxE6Y0XsF5OitNL5Aw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 218 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TG1zUpFwbImVsl8lIcgn-wtlUfIxE6Y0XsF5OitNL5Aw' 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) 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" = 'pKKj4vfKbpgka0QvXIbbvAVUrKGpOkY56UvNYQUIDmxg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 839], ["target_type", "User"], ["token", "pKKj4vfKbpgka0QvXIbbvAVUrKGpOkY56UvNYQUIDmxg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 219 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uo2LPITj19GbEOTeuKsY2ALW5aD8XVB2sGJ7TspEDyvg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00], ["target_id", 840], ["target_type", "User"], ["token", "uo2LPITj19GbEOTeuKsY2ALW5aD8XVB2sGJ7TspEDyvg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:22:54 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (10.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 12ms (Views: 9.4ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) 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" = 842 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 842], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 842 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 842 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 1.1ms)  (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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 843 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 843], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 843], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 843], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 843 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 34ms (Views: 32.4ms | ActiveRecord: 0.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 844 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 844], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 844], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 844], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"885"} NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 844 AND "notify_user_notifications"."target_type" = 'User' AND (id = '885') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 844]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 885 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 15ms (Views: 1.3ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 885 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 845], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 845], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 845], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"888"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 845 AND "notify_user_notifications"."target_type" = 'User' AND (id = '888') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 845]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 888 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.5ms | ActiveRecord: 2.4ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"888"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 845 AND "notify_user_notifications"."target_type" = 'User' AND (id = '888') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.9ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 846], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 846], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 846], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 846 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 4ms (ActiveRecord: 0.7ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 846 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) 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" = 847 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 847], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["894"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 847 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('894')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 847 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('894')) Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.7ms) 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", 894]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 848 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 848], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["895"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 848 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('895')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 848 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('895')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.6ms)  (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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 849], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 849) LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["target_id", 849], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.2ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 850 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 850], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 850 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 (1.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 850 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 850 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 5ms (Views: 0.2ms | ActiveRecord: 1.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 850 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 851 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 851], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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.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" = 851) 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["target_id", 851], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 851 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 6ms (ActiveRecord: 1.5ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 852], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 852) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["target_id", 852], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 163]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.1ms) 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 853 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 853], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 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" = 853 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ilGORLLfaL1D7_fQVEo88geHFLA7r9u6VrGo7RBKAYlA' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["target_id", 853], ["target_type", "User"], ["token", "ilGORLLfaL1D7_fQVEo88geHFLA7r9u6VrGo7RBKAYlA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"ilGORLLfaL1D7_fQVEo88geHFLA7r9u6VrGo7RBKAYlA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ilGORLLfaL1D7_fQVEo88geHFLA7r9u6VrGo7RBKAYlA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ilGORLLfaL1D7_fQVEo88geHFLA7r9u6VrGo7RBKAYlA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 853]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 853) 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", Thu, 05 Mar 2015 05:25:35 UTC +00:00], ["target_id", 853], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 221 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:25:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.4ms | ActiveRecord: 3.0ms) NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 854], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 854 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 855 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 855], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 856], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 857 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 857], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 857 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 904 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) 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" = 858 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 858], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 858 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 905 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) 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.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 859 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 859], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 859 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 906 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:25:37 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') 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 860 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 860], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 860 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 907 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) 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" = 861 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 861], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 861 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 862 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 862], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 862 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 862 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 909 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 862 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 909) 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", 909]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 862]] 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" = 862 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 863], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) 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" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 863], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 911 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 863 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 911)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 864 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 864], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 864 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 864 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 912 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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", 912]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 864]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 864 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 864 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '0G2K-gFoQiw_BrCagkeaEw8ArhZSC7B-ElrYJUAxg6QA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 864], ["target_type", "User"], ["token", "0G2K-gFoQiw_BrCagkeaEw8ArhZSC7B-ElrYJUAxg6QA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.3ms) Date: Thu, 05 Mar 2015 16:25:37 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e8d1955e4_d0193ff50cc65bec305df@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 865 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 865], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 865 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 913 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 866 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 866], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 866) 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 866], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 914]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 866]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 866 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 867 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 867], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 915]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 867]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 867 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 868 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 868], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 868 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 868 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 916 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 916]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 868]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 868 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 868 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'htfM0xIl6_mkf0WjLzFa9gKp8uQI04UNODavrOHo8AQA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 868], ["target_type", "User"], ["token", "htfM0xIl6_mkf0WjLzFa9gKp8uQI04UNODavrOHo8AQA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.7ms) Date: Thu, 05 Mar 2015 16:25:37 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e8d1a63cb_d0193ff50cc65bec3066a@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 869 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 869], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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", 917]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 869]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 869 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 870 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 870], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 918]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 870]] NewPostNotification Load (0.3ms) 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" = 870 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.3ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 870]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 870 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 918 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 871], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 871], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 920]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 871]] NewPostNotification Load (0.3ms) 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" = 871 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 871]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 919 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 871]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 920 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 872], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 872 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'IRxCxE2mEWGypU1CvLppcgdhY9Jm7VPa9M4sZmLBaHHA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 872], ["target_type", "User"], ["token", "IRxCxE2mEWGypU1CvLppcgdhY9Jm7VPa9M4sZmLBaHHA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 873], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 873 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2wUO-a1MOo_DISlZMDP0qAJznRk5xz5VM90b0w7eM-jw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 873], ["target_type", "User"], ["token", "2wUO-a1MOo_DISlZMDP0qAJznRk5xz5VM90b0w7eM-jw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 873 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 874 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["state", "pending"], ["target_id", 874], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 874 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3qMhAy6UQsPDC8FwNedcZQt0mq3AXY14eUMR4-SAnzBA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 874], ["target_type", "User"], ["token", "3qMhAy6UQsPDC8FwNedcZQt0mq3AXY14eUMR4-SAnzBA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 226 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 874 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NNClzINoG-nTz9PgQzTyxANB8_fZb0CwVGJ9druaSbTw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 874], ["target_type", "User"], ["token", "NNClzINoG-nTz9PgQzTyxANB8_fZb0CwVGJ9druaSbTw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 875) 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 875], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 166 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 875) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 875 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 876) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 876], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 876) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 876 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 877) 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 877], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 877) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 877) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 168]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 878 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 878], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'p_46yza4ySIVPYa9zmJNTAGNTzG0eXlEHfen0fMfjN7A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 879], ["target_type", "User"], ["token", "p_46yza4ySIVPYa9zmJNTAGNTzG0eXlEHfen0fMfjN7A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'p_46yza4ySIVPYa9zmJNTAGNTzG0eXlEHfen0fMfjN7A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 'id5ZtpxJYTmHkAPQILc0JgFFirKeB2UWUkD5sYbtY72g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 880], ["target_type", "User"], ["token", "id5ZtpxJYTmHkAPQILc0JgFFirKeB2UWUkD5sYbtY72g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 229 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'id5ZtpxJYTmHkAPQILc0JgFFirKeB2UWUkD5sYbtY72g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) 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" = 'v03a-Fq16ULOhYFKYTf4BQLk8M7c4PJmm6kcJxjbuygQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 881], ["target_type", "User"], ["token", "v03a-Fq16ULOhYFKYTf4BQLk8M7c4PJmm6kcJxjbuygQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 230 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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" = 'wgingAm_yhGi3oezJjfdWAI6EBTTAM39MqiODA-S8mQA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:25:37 UTC +00:00], ["target_id", 882], ["target_type", "User"], ["token", "wgingAm_yhGi3oezJjfdWAI6EBTTAM39MqiODA-S8mQA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:25:37 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.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 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" = 884 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 884], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 884 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 884 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 15ms (Views: 9.3ms | ActiveRecord: 1.2ms)  (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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) 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" = 885 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 885], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 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" = 885 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 885], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 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" = 885 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 885], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 885 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 40ms (Views: 37.8ms | ActiveRecord: 0.5ms)  (0.4ms) 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 886], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) 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" = 886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 886], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 886 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 886], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"929"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 886 AND "notify_user_notifications"."target_type" = 'User' AND (id = '929') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 886]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 929 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 3.0ms | ActiveRecord: 2.8ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 929 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 887], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 887 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 887], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 887 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 887], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"932"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 887 AND "notify_user_notifications"."target_type" = 'User' AND (id = '932') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 887]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 932 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"932"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 887 AND "notify_user_notifications"."target_type" = 'User' AND (id = '932') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 888 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 888], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 888 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 888], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 888 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 888], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 888 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 888 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 889 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 889], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["938"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 889 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('938')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 889 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('938')) Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.7ms) 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", 938]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) 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" = 890 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 890], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["939"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 890 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('939')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 890 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('939')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 891], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 891) LIMIT 1 SQL (1.0ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["target_id", 891], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 2.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 892], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 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" = 892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 893], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 893) 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["target_id", 893], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 894 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 894], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 894) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["target_id", 894], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 171]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.1ms) 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" = 895 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 895], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 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" = 895 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'u83Cv8pvTiokldsbl8NX3gRqhcbKvqe_eN3J6xzTas5Q' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["target_id", 895], ["target_type", "User"], ["token", "u83Cv8pvTiokldsbl8NX3gRqhcbKvqe_eN3J6xzTas5Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"u83Cv8pvTiokldsbl8NX3gRqhcbKvqe_eN3J6xzTas5Q"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'u83Cv8pvTiokldsbl8NX3gRqhcbKvqe_eN3J6xzTas5Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'u83Cv8pvTiokldsbl8NX3gRqhcbKvqe_eN3J6xzTas5Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 895]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 895) 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", Thu, 05 Mar 2015 05:26:36 UTC +00:00], ["target_id", 895], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 232 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:36 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 3.0ms) NotifyUser::UserHash Load (0.4ms) 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 (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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 896 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 896], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 896 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 897], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 898 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 898], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 899], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 948 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 900 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 900], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 900 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 949 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 901], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 950 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 902 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 902], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 902 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 951 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:38 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') 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 903 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 903], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 903 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 904 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 904], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 904 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 904 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 953 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 904 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 953) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 953]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 904]] 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" = 904 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (2.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (1.9ms) 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" = 905 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 905], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 905 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 905], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 905 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 905 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 955 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 905 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 955)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 906 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 906], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 906 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" = 906 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 956 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) 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" = $1 LIMIT 1 [["id", 956]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 906]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 906 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 906 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'W5Ha08awDpfdL5zj3qY8Hw1YnIAaYpEjPOil_z783jgA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 906], ["target_type", "User"], ["token", "W5Ha08awDpfdL5zj3qY8Hw1YnIAaYpEjPOil_z783jgA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.4ms) Date: Thu, 05 Mar 2015 16:26:38 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e90e5073c_d24e3fe645865be467480@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 907 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 907], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 907 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 957 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 908 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 908], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 908) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 908], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 958]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 908]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 908 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 909 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 909], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 959]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 909]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 909 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 910 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 910], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 910 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 910 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 960 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 960]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 910]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 910 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" = 910 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KIOB9mt5H_Twus4caz3sKAhiozj8GyqXdUv7qamxL1lw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 910], ["target_type", "User"], ["token", "KIOB9mt5H_Twus4caz3sKAhiozj8GyqXdUv7qamxL1lw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.7ms) Date: Thu, 05 Mar 2015 16:26:38 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e90e613a4_d24e3fe645865be46758@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) 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" = 911 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 911], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) 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", 961]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 911]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 911 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 912 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 912], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) 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", 962]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 912]] NewPostNotification Load (0.3ms) 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" = 912 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 912]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 912 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 962 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 913 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 913], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 913 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 913], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 964]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 913]] 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" = 913 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.3ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 913]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 913 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 963 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 913]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 913 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 964 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 914], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 914 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QW_tCQOV2ZPjQzwOAXQITwsSKi43ZAXZ1LKHoIRRXxvw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 914], ["target_type", "User"], ["token", "QW_tCQOV2ZPjQzwOAXQITwsSKi43ZAXZ1LKHoIRRXxvw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 915], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 915 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rlr5BSVgU6aXHb1ag2IyggC9qTDCUpRwweCmiyTMuZVQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 915], ["target_type", "User"], ["token", "rlr5BSVgU6aXHb1ag2IyggC9qTDCUpRwweCmiyTMuZVQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 915 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["state", "pending"], ["target_id", 916], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 916 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3tval028aWgG9TZ8_6jPcgj2D4ZqJdasgRzoy-uW59Fg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 916], ["target_type", "User"], ["token", "3tval028aWgG9TZ8_6jPcgj2D4ZqJdasgRzoy-uW59Fg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 237 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 916 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pKB4kusfPmF8fxsKAJUABwfVtgrY0q4RS6NQwbx3l71w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 916], ["target_type", "User"], ["token", "pKB4kusfPmF8fxsKAJUABwfVtgrY0q4RS6NQwbx3l71w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) 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" = 917) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 917], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 174 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 917) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 917 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 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" = 918) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 918], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 175 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 918) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 919) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 919], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 176 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 919) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 919) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 176]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 920], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'w4XaSt7PjQtSt-sj-bVJZQNuU_iL71APa6k3EUqXF1Qg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 921], ["target_type", "User"], ["token", "w4XaSt7PjQtSt-sj-bVJZQNuU_iL71APa6k3EUqXF1Qg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'w4XaSt7PjQtSt-sj-bVJZQNuU_iL71APa6k3EUqXF1Qg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4nudj2C9RXDegnLRXNBrBQ2Kv6CuRytCZleDMFRrtRWw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 922], ["target_type", "User"], ["token", "4nudj2C9RXDegnLRXNBrBQ2Kv6CuRytCZleDMFRrtRWw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 240 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4nudj2C9RXDegnLRXNBrBQ2Kv6CuRytCZleDMFRrtRWw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yzxXvrM2KgMklUQidOcluwQYfFCMEchWvZo_ulYUaqkA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 923], ["target_type", "User"], ["token", "yzxXvrM2KgMklUQidOcluwQYfFCMEchWvZo_ulYUaqkA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 241 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5DD1QnxLjZ1ZjQ6fVqhlegfJlFJybMMTTZlxzrRDAI9w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00], ["target_id", 924], ["target_type", "User"], ["token", "5DD1QnxLjZ1ZjQ6fVqhlegfJlFJybMMTTZlxzrRDAI9w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 0.0ms)  (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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 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" = 926 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 926], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 926 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 926 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 13ms (Views: 7.1ms | ActiveRecord: 1.2ms)  (0.4ms) 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 927 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 927], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 927 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 927], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 927 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 927], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 927 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 25ms (Views: 23.5ms | ActiveRecord: 0.4ms)  (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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 928], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 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" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 928], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 928], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"973"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 928 AND "notify_user_notifications"."target_type" = 'User' AND (id = '973') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 928]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 973 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 2.2ms | ActiveRecord: 2.7ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 973 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) 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" = 929 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 929], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 929 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 929], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 929 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 929], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"976"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 929 AND "notify_user_notifications"."target_type" = 'User' AND (id = '976') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 929]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 929 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 976 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.2ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"976"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 929 AND "notify_user_notifications"."target_type" = 'User' AND (id = '976') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.7ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 930 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 930], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 930 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 930], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 930 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 930], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 930 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.7ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 930 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 931 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 931], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["982"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 931 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('982')) NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 931 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('982')) Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.1ms) NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 982]]  (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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 932 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 932], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["983"]} SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 932 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('983')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 932 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('983')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.9ms)  (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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 933 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 933], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 933 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 933 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.6ms) 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" = 933) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["target_id", 933], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 933 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 15ms (Views: 0.3ms | ActiveRecord: 2.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 933 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 934 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 934], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 934 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 934 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 934 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 934 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 935 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 935], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 935) 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["target_id", 935], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 935 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 936 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 936], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 936) LIMIT 1 SQL (1.0ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["target_id", 936], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 936 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 179]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 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", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 937], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 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" = 937 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'R17DcNTNxJIL3m8YdjyvXgsq2jtrUfYDmg530xnXwD7g' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["target_id", 937], ["target_type", "User"], ["token", "R17DcNTNxJIL3m8YdjyvXgsq2jtrUfYDmg530xnXwD7g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"R17DcNTNxJIL3m8YdjyvXgsq2jtrUfYDmg530xnXwD7g"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'R17DcNTNxJIL3m8YdjyvXgsq2jtrUfYDmg530xnXwD7g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'R17DcNTNxJIL3m8YdjyvXgsq2jtrUfYDmg530xnXwD7g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 937]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 937) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00], ["target_id", 937], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 243 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:47 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.4ms) 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", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 938 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 938], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 938 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 939 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 939], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 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" = 940 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 940], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.4ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 941], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 992 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) 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.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", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 942], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.5ms) 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" = 942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 993 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 943 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 943], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 943 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 994 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 944 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 944], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 944 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 995 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 945 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 945], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 945 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 946], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 997 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 946 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 997) 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", 997]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 946]] NewPostNotification Load (0.3ms) 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" = 946 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 947], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00], ["state", "pending"], ["target_id", 947], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 999 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 947 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 999)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 948 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 948], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 948 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 948 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1000 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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", 1000]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 948]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 948 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 948 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YFgK1bV5Iyk2NjErGdQAJgbmiwg2KggScJPa8Za0RvzQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 948], ["target_type", "User"], ["token", "YFgK1bV5Iyk2NjErGdQAJgbmiwg2KggScJPa8Za0RvzQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.4ms) Date: Thu, 05 Mar 2015 16:26:49 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e91973d8_d44f3fe04d065be035547@Antons-MacBook-Pro.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.4ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 949 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 949], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 949 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1001 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 950 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 950], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 950) 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 950], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1002]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 950]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 950 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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" = 951 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 951], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1003]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 951]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 951 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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" = 952 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 952], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 952 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 952 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1004 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1004]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 952]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 952 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" = 952 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '15wRWXqy-3aM1BPdRBZrNQ29D2lwgmeskiE5WJQMdYMw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 952], ["target_type", "User"], ["token", "15wRWXqy-3aM1BPdRBZrNQ29D2lwgmeskiE5WJQMdYMw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.7ms) Date: Thu, 05 Mar 2015 16:26:49 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e919172db_d44f3fe04d065be035657@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 953 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 953], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1005]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 953]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 953 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 954 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 954], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1006]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 954]] NewPostNotification Load (0.3ms) 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" = 954 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 954]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 954 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1006 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 955 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 955], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 955 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 955], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1008]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 955]] 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" = 955 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 955]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 955 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1007 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 955]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 955 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1008 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 956 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 956], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 956 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z8nKi4C66s7B1-CXibdt4QcutokZ-evGKZIDPCBf9rpw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 956], ["target_type", "User"], ["token", "z8nKi4C66s7B1-CXibdt4QcutokZ-evGKZIDPCBf9rpw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 957 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 957], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 957 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'wA8AryFIWvgiT4-_K4RkRQQj5eYSb13F9nPoxKpoK-Ww' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 957], ["target_type", "User"], ["token", "wA8AryFIWvgiT4-_K4RkRQQj5eYSb13F9nPoxKpoK-Ww"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 957 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 958 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["state", "pending"], ["target_id", 958], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) 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" = 958 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VmGDIP8UGlLaXqaeWuhLPQ9cWQbQF3aWW1CAelXgtMdQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 958], ["target_type", "User"], ["token", "VmGDIP8UGlLaXqaeWuhLPQ9cWQbQF3aWW1CAelXgtMdQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 248 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 958 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2YeR9OrjahJ_lJ4zD1doag5jckl4F0irtlCaDif-7V1w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 958], ["target_type", "User"], ["token", "2YeR9OrjahJ_lJ4zD1doag5jckl4F0irtlCaDif-7V1w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 959) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 959], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 182 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 959) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 959 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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 960) 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 960], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 183 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 960) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 960 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 961) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 961], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 184 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 961) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 961) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 961 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 961 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 184]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 961 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 962 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 962], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '6OxMBXjPF6pQx8Nonql2qgP8z2l5nlWZRColZ4QlLzLA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 963], ["target_type", "User"], ["token", "6OxMBXjPF6pQx8Nonql2qgP8z2l5nlWZRColZ4QlLzLA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '6OxMBXjPF6pQx8Nonql2qgP8z2l5nlWZRColZ4QlLzLA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) 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" = 'ttXYV4hpjdR4p9Ju0bzdnAIYO5fw5vWkSB_-uOd4DI0A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 964], ["target_type", "User"], ["token", "ttXYV4hpjdR4p9Ju0bzdnAIYO5fw5vWkSB_-uOd4DI0A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 251 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ttXYV4hpjdR4p9Ju0bzdnAIYO5fw5vWkSB_-uOd4DI0A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 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" = 'Zc14sWMr8-PJEeUi8_EeYgGpl2UxEHPpbjsu4bknW_lA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 965], ["target_type", "User"], ["token", "Zc14sWMr8-PJEeUi8_EeYgGpl2UxEHPpbjsu4bknW_lA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 252 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:26:49 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", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'E0XjjXtTIyW-pFpqbNsKsgRj9biX1ho_e_lA5Y5NdzLw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00], ["target_id", 966], ["target_type", "User"], ["token", "E0XjjXtTIyW-pFpqbNsKsgRj9biX1ho_e_lA5Y5NdzLw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:26:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.6ms) BEGIN  (0.7ms) ROLLBACK  (1.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.0ms)  (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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 968], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 968 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 968 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.6ms | ActiveRecord: 1.2ms)  (0.3ms) 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 969 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 969], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 969 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 969], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 969 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 969], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 969 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 24ms (Views: 23.2ms | ActiveRecord: 0.4ms)  (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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) 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" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 970], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 970], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 970 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 970], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1017"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 970 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1017') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 970]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1017 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1017 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) 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" = 971 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 971], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 971 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 971], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 971 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 971], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1020"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 971 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1020') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 971]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 971 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1020 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1020"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 971 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1020') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 972 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 972], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 972 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 972], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 972 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 972], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 972 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 972 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 973 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 973], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1026"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 973 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1026')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 973 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1026')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms) 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", 1026]]  (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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 974 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 974], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1027"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 974 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1027')) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 974 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1027')) Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 1.0ms)  (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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 975 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 975], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 975 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 975 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 975) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["target_id", 975], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 975 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 975 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 976 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 976], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 976 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 976 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 976 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 976 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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" = 977 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 977], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 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.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" = 977) 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["target_id", 977], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 977 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 978 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 978], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 978) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["target_id", 978], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 978 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 187]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 979 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 979], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.1ms) 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" = 979 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OeHigoq5r_DwBSs4ecXssAeydGeLI7CSZBo1vdP7SA5g' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["target_id", 979], ["target_type", "User"], ["token", "OeHigoq5r_DwBSs4ecXssAeydGeLI7CSZBo1vdP7SA5g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"OeHigoq5r_DwBSs4ecXssAeydGeLI7CSZBo1vdP7SA5g"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OeHigoq5r_DwBSs4ecXssAeydGeLI7CSZBo1vdP7SA5g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OeHigoq5r_DwBSs4ecXssAeydGeLI7CSZBo1vdP7SA5g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 979]]  (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" = 979) 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", Thu, 05 Mar 2015 05:27:53 UTC +00:00], ["target_id", 979], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 254 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:27:53 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 3.4ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) ROLLBACK  (0.3ms) BEGIN  (0.4ms) 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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" = 980 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 980], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 980 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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" = 981 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 981], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 982 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 982], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 983 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 983], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 983 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1036 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 984 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 984], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 984 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1037 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 985 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 985], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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" = 985 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1038 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:27:56 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') 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 986 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 986], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 986 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1039 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 987 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 987], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 987 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 988 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 988], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 988 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 988 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1041 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 988 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1041) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1041]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 988]] 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" = 988 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 989 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 989], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 989 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 989], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 989 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 989 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1043 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 989 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1043)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 990 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 990], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 990 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 990 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1044 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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", 1044]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 990]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 990 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 990 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'S1ZYo2mbE7MXs7YtPfZEcASFzGhL5HKgsGYR-Lt5ePIg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 990], ["target_type", "User"], ["token", "S1ZYo2mbE7MXs7YtPfZEcASFzGhL5HKgsGYR-Lt5ePIg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.3ms) Date: Thu, 05 Mar 2015 16:27:56 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e95ca537e_d70d3ff358865bec8139f@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 991], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1045 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 992], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 992) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 992], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1046]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 992]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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" = 993 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 993], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1047]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 993]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 993 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 994 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 994], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 994 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 994 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1048 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1048]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 994]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 994 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 994 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NXa6JSclTKEzy4FYGBZ04g-N3b-C94Wc8odzAijR_Rfw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 994], ["target_type", "User"], ["token", "NXa6JSclTKEzy4FYGBZ04g-N3b-C94Wc8odzAijR_Rfw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.2ms) Date: Thu, 05 Mar 2015 16:27:56 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e95cb5271_d70d3ff358865bec814ec@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 995 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 995], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1049]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 995]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 995 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 996 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 996], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1050]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 996]] 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" = 996 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 996]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 996 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1050 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) 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" = 997 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 997], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 997 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 997], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1052]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 997]] NewPostNotification Load (0.3ms) 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" = 997 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 997]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 997 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1051 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 997]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 997 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1052 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 998 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 998], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 998 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'x6fV5aaTnUGDXpSWfnlDOAcid_dIFAW6IghN3yfnfKZg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 998], ["target_type", "User"], ["token", "x6fV5aaTnUGDXpSWfnlDOAcid_dIFAW6IghN3yfnfKZg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 999 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 999], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 999 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VZOt-YI9T1hcWjt6Uto5IAoAzKaZWYxpbJ6lTDcllmVg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 999], ["target_type", "User"], ["token", "VZOt-YI9T1hcWjt6Uto5IAoAzKaZWYxpbJ6lTDcllmVg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 999 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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" = 1000 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["state", "pending"], ["target_id", 1000], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1000 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'M_hzYE1rhwwQxCWS_1-BewdEoAhQTqhlcO7-Fl7vRpKg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1000], ["target_type", "User"], ["token", "M_hzYE1rhwwQxCWS_1-BewdEoAhQTqhlcO7-Fl7vRpKg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 259 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1000 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XSpx_dPqQiKkuBV5UwbDlwdqHEUeJvk49n7exEA_N7_g' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1000], ["target_type", "User"], ["token", "XSpx_dPqQiKkuBV5UwbDlwdqHEUeJvk49n7exEA_N7_g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1001) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1001], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 190 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1001) LIMIT 1  (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" = 1001 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1002) 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1002], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1002) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1002 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1003) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1003], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 192 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1003) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1003) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1003 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1003 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 192]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1003 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1004 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1004], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ClCTBi0W2lwRWO6ZMYwCeA10lqxNzrG1UrOOhRMGqJVw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1005], ["target_type", "User"], ["token", "ClCTBi0W2lwRWO6ZMYwCeA10lqxNzrG1UrOOhRMGqJVw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ClCTBi0W2lwRWO6ZMYwCeA10lqxNzrG1UrOOhRMGqJVw' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) 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" = 'iPcMBAakKJeui7E98Dc0sgrOo4zYJ5tQT-5m2Iaj5MRw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1006], ["target_type", "User"], ["token", "iPcMBAakKJeui7E98Dc0sgrOo4zYJ5tQT-5m2Iaj5MRw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 262 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iPcMBAakKJeui7E98Dc0sgrOo4zYJ5tQT-5m2Iaj5MRw' 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", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 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" = 'iQ44_VcC9Icz0RVsRms2YwWmuSob0AYEk1zOPgdGjfRw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1007], ["target_type", "User"], ["token", "iQ44_VcC9Icz0RVsRms2YwWmuSob0AYEk1zOPgdGjfRw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 263 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZZXg94-LMGv0YPNP0qgdwgBpZ558jHvmjAZqLbWzX2mw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00], ["target_id", 1008], ["target_type", "User"], ["token", "ZZXg94-LMGv0YPNP0qgdwgBpZ558jHvmjAZqLbWzX2mw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:27:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.0ms)  (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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) 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" = 1010 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1010], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1010 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1010 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 1.0ms)  (0.3ms) 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1011], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) 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" = 1011 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1011], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1011], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1011 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 22ms (Views: 20.7ms | ActiveRecord: 0.5ms)  (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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1012 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1012], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 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" = 1012 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1012], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 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" = 1012 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1012], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1061"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1012 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1061') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1012]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1012 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1061 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.2ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1061 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) 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" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1013], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1013], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 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" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1013], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1064"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1013 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1064') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1013]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1064 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1064"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1013 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1064') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.1ms | ActiveRecord: 2.4ms)  (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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1014 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1014], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1014 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1014], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1014 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1014], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1014 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1014 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 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" = 1015 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1015], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1070"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1015 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1070')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1015 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1070')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.8ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1070]]  (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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1016 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1016], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1071"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1016 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1071')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1016 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1071')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1017 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1017], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1017 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1017 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1017) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["target_id", 1017], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1017 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1017 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1018 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1018], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1018 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1018 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1018 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1018 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1019 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1019], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1019) 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["target_id", 1019], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1019 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1020 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1020], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1020) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["target_id", 1020], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1020 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 195]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1021 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1021], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) 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" = 1021 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZDLWw05D81pzzi_Zr_8ouQ9hPYjk6vvvhS4lpUoMu-xw' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["target_id", 1021], ["target_type", "User"], ["token", "ZDLWw05D81pzzi_Zr_8ouQ9hPYjk6vvvhS4lpUoMu-xw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"ZDLWw05D81pzzi_Zr_8ouQ9hPYjk6vvvhS4lpUoMu-xw"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZDLWw05D81pzzi_Zr_8ouQ9hPYjk6vvvhS4lpUoMu-xw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZDLWw05D81pzzi_Zr_8ouQ9hPYjk6vvvhS4lpUoMu-xw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1021]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1021) 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", Thu, 05 Mar 2015 05:28:02 UTC +00:00], ["target_id", 1021], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 265 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.3ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 1022 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1022], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1022 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) 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" = 1023 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1023], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1024 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1024], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1025 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1025], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1025 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1080 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1026 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1026], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1026 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1081 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1027 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1027], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 1027 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1082 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 1028 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1028], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1028 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1083 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 1029 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1029], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1029 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1030], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1085 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1030 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1085) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1085]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1030]] NewPostNotification Load (0.3ms) 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" = 1030 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) 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" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1031], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1031], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1087 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1031 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1087)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1032], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1088 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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", 1088]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1032]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1032 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'koDRVKU-lRdnniRmyq4j_gxfJmuaOizgOSHQv14R7fIA' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1032], ["target_type", "User"], ["token", "koDRVKU-lRdnniRmyq4j_gxfJmuaOizgOSHQv14R7fIA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.1ms) Date: Thu, 05 Mar 2015 16:28:04 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e964bb4f5_d9073fc708465be043656@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1033 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1033], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1033 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1089 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1034 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1034], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1034) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1034], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1090]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1034]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1034 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1035], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1091]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1035]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1036], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 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" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1092 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1092]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1036]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1036 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'spZS8cu-F4ns-VJoktPyCwuDJrac9RGQsVar_meP6htA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1036], ["target_type", "User"], ["token", "spZS8cu-F4ns-VJoktPyCwuDJrac9RGQsVar_meP6htA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.0ms) Date: Thu, 05 Mar 2015 16:28:04 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e964cb1d9_d9073fc708465be043735@Antons-MacBook-Pro.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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1037 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1037], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1093]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1037]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1037 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1038 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1038], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1094]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1038]] NewPostNotification Load (0.3ms) 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" = 1038 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1038]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1038 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1094 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1039 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1039], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1039 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1039], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1096]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1039]] NewPostNotification Load (0.3ms) 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" = 1039 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1039]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1039 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1095 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1039]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1039 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1096 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) 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" = 1040 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1040], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1040 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'bFshPQomQtq555c_p9uSDwukfZVV_ueLjG1MAC0IVmxQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1040], ["target_type", "User"], ["token", "bFshPQomQtq555c_p9uSDwukfZVV_ueLjG1MAC0IVmxQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1041 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1041], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1041 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '55yyeuq3eTpOQYzOujFWcgLqVIq8C4xLcLXtW2MD3dJQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1041], ["target_type", "User"], ["token", "55yyeuq3eTpOQYzOujFWcgLqVIq8C4xLcLXtW2MD3dJQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1041 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1042 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["state", "pending"], ["target_id", 1042], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1042 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'v4WNUFpMzRlO_VjjE9PpNgTnea0pbAODkKCxV9a0YBdA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1042], ["target_type", "User"], ["token", "v4WNUFpMzRlO_VjjE9PpNgTnea0pbAODkKCxV9a0YBdA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 270 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1042 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'h2ewBCQYwf3xqHE7Tsr_jwN3AkBj4ftXYTfm8V9-oC0A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1042], ["target_type", "User"], ["token", "h2ewBCQYwf3xqHE7Tsr_jwN3AkBj4ftXYTfm8V9-oC0A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 1043) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1043], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 198 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1043) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1043 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1044) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1044], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 199 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1044) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1044 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1045) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1045], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 200 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1045) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1045) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1045 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1045 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 200]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1045 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 1046 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1046], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 'pHsfy5W8oGs-x4vH1hq2FAEZTuThGjGGNm2vgDY3AFMQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1047], ["target_type", "User"], ["token", "pHsfy5W8oGs-x4vH1hq2FAEZTuThGjGGNm2vgDY3AFMQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pHsfy5W8oGs-x4vH1hq2FAEZTuThGjGGNm2vgDY3AFMQ' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'n7znj6L1v7s079LIt-aBnQJTacQYQNKY_IvuqQPcbP8Q' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1048], ["target_type", "User"], ["token", "n7znj6L1v7s079LIt-aBnQJTacQYQNKY_IvuqQPcbP8Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 273 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'n7znj6L1v7s079LIt-aBnQJTacQYQNKY_IvuqQPcbP8Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) 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", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 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" = 'z-W0o9RALcL8wWHuTNffpgsf3XOUh5_h-wRpwhYNBbuw' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1049], ["target_type", "User"], ["token", "z-W0o9RALcL8wWHuTNffpgsf3XOUh5_h-wRpwhYNBbuw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 274 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (1.0ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GJ_mfUvUfzAAR2rPi7SIBwU7FBr8gbLNKHnO0nLZOGuA' LIMIT 1 SQL (1.0ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00], ["target_id", 1050], ["target_type", "User"], ["token", "GJ_mfUvUfzAAR2rPi7SIBwU7FBr8gbLNKHnO0nLZOGuA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:04 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (3.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 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" = 1052 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1052], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1052 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1052 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 14ms (Views: 9.0ms | ActiveRecord: 1.1ms)  (0.4ms) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1053 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1053], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (29.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1053 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1053], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1053 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1053], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1053 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 23ms (Views: 20.5ms | ActiveRecord: 0.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1054 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1054], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1054 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1054], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1054 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1054], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1105"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1054 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1105') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1054]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1054 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1105 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 2.9ms | ActiveRecord: 3.2ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1105 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1055], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1055], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) 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" = 1055 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1055], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1108"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1055 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1108') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1055]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1108 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1108"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1055 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1108') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1056 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1056], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1056 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1056], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1056 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1056], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1056 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1056 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1057], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1114"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1057 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1114')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1057 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1114')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) 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", 1114]]  (0.2ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1058 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1058], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1115"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1058 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1115')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1058 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1115')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1059], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1059) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1059], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 15ms (Views: 0.3ms | ActiveRecord: 2.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1060 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1060], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1060 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1060 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1060 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1060 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1061 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1061], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1061) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1061], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1061 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1062 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1062], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1062) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1062], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1062 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 203]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1063 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1063], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 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" = 1063 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-qL9ihkj3cVQBCH3PXq1lQdiapiYJi1IhsdzQX8HL9Og' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1063], ["target_type", "User"], ["token", "-qL9ihkj3cVQBCH3PXq1lQdiapiYJi1IhsdzQX8HL9Og"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"-qL9ihkj3cVQBCH3PXq1lQdiapiYJi1IhsdzQX8HL9Og"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-qL9ihkj3cVQBCH3PXq1lQdiapiYJi1IhsdzQX8HL9Og' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-qL9ihkj3cVQBCH3PXq1lQdiapiYJi1IhsdzQX8HL9Og' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1063]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1063) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1063], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 276 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1064 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1064], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1064 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1065 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1065], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1066 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1066], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1067 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1067], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1067 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1124 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:13 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') 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1068 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1068], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 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" = 1068 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1125 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1069 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1069], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1069 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1126 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1070 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1070], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1070 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1127 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1071 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1071], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1071 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1072 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1072], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1072 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1072 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1129 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1072 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1129) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1129]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1072]] 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" = 1072 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1073 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1073], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1073 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1073], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1073 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1073 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1131 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1073 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1131)  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 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" = 1074 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1074], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1074 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1074 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1132 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 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", 1132]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1074]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1074 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1074 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DtNj_9uYl2P1gJw-igQwvQlzbwx29Q5TUNJDXFnhzJMw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1074], ["target_type", "User"], ["token", "DtNj_9uYl2P1gJw-igQwvQlzbwx29Q5TUNJDXFnhzJMw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.4ms) Date: Thu, 05 Mar 2015 16:28:13 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e96dbb1dc_db083fd688465bec155a4@Antons-MacBook-Pro.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.1ms) BEGIN  (0.5ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1075 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1075], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1075 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1133 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1076 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1076], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1076) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1076], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1134]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1076]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1076 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1077 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1077], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1135]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1077]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1077 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1078 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1078], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1078 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1078 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1136 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1136]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1078]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1078 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1078 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nHMBNlX4Ppn1w009m3jF7gIAzL_gtPHTX17PznFdS1Wg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1078], ["target_type", "User"], ["token", "nHMBNlX4Ppn1w009m3jF7gIAzL_gtPHTX17PznFdS1Wg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (4.9ms) Date: Thu, 05 Mar 2015 16:28:13 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e96dcb327_db083fd688465bec1569e@Antons-MacBook-Pro.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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1079 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1079], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1137]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1079]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1079 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1080 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1080], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1138]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1080]] NewPostNotification Load (0.3ms) 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" = 1080 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1080]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1080 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1138 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) 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" = 1081 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1081], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1081 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1081], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1140]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1081]] 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" = 1081 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1081]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1081 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1139 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1081]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1081 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1140 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1082 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1082], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 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" = 1082 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xTrRZit0snTNAdRl8uc1owCsQjZ9wUZgzA9vDQr7tgTQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1082], ["target_type", "User"], ["token", "xTrRZit0snTNAdRl8uc1owCsQjZ9wUZgzA9vDQr7tgTQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1083 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1083], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1083 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1Baq6KOcEyw9Hog4PalCeglzFTdwh4qUxCoaCt9f-smg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1083], ["target_type", "User"], ["token", "1Baq6KOcEyw9Hog4PalCeglzFTdwh4qUxCoaCt9f-smg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1083 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1084 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1084], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1084 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q-oSAP_B8ZtDvNsBEbDfogEdWS79ybVsRDWpMk-PZU4g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1084], ["target_type", "User"], ["token", "q-oSAP_B8ZtDvNsBEbDfogEdWS79ybVsRDWpMk-PZU4g"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 281 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:13 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" = 1084 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JUoGnwAIqUt7-3YPUGgrswcLeSxVztd9iKD0KjK72IDQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1084], ["target_type", "User"], ["token", "JUoGnwAIqUt7-3YPUGgrswcLeSxVztd9iKD0KjK72IDQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1085) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1085], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1085) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1085 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1086) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1086], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1086) LIMIT 1  (0.1ms) 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" = 1086 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1087) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1087], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 208 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1087) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1087) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1087 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1087 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 208]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1087 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1088 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1088], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'V7u9cr9JF1EQYtYetDpxDQ8sxWHscSTQecxCjpyTBMbw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1089], ["target_type", "User"], ["token", "V7u9cr9JF1EQYtYetDpxDQ8sxWHscSTQecxCjpyTBMbw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'V7u9cr9JF1EQYtYetDpxDQ8sxWHscSTQecxCjpyTBMbw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5a_TQdmDTwNQYyCo0bKaLQ4O4fN83GyG5UQ9pmRPZrbQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1090], ["target_type", "User"], ["token", "5a_TQdmDTwNQYyCo0bKaLQ4O4fN83GyG5UQ9pmRPZrbQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 284 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5a_TQdmDTwNQYyCo0bKaLQ4O4fN83GyG5UQ9pmRPZrbQ' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '6GqMKBEdQC5XT2Uib9kbbQOZSt_ojmqepOxKeQulilPQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1091], ["target_type", "User"], ["token", "6GqMKBEdQC5XT2Uib9kbbQOZSt_ojmqepOxKeQulilPQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 285 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (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", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.1ms) 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" = 'j6PE_26XR-RVh6FTRCZ8igXOL6HCopy0kEsovDdQPbOw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00], ["target_id", 1092], ["target_type", "User"], ["token", "j6PE_26XR-RVh6FTRCZ8igXOL6HCopy0kEsovDdQPbOw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:28:13 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.0ms)  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 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" = 1094 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1094], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1094 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1094 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 7.1ms | ActiveRecord: 1.2ms)  (0.4ms) 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1095 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1095], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1095 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1095], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1095 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1095], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1095 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 21ms (Views: 20.2ms | ActiveRecord: 0.4ms)  (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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1096 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1096], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1096 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1096], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1096 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1096], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1149"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1096 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1149') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1096]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1096 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1149 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.6ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1149 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1097 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1097], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1097 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1097], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1097 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1097], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1152"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1097 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1152') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1097]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1097 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1152 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1152"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1097 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1152') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1098 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1098], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1098 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1098], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1098 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1098], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1098 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1098 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) 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" = 1099 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1099], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1158"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1099 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1158')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1099 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1158')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1158]]  (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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1100 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1100], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1159"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1100 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1159')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1100 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1159')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1101 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1101], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1101 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1101 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1101) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["target_id", 1101], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1101 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.2ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1101 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 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" = 1102 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1102], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1102 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1103 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1103], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1103) 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["target_id", 1103], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) 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" = 1103 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1104 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1104], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1104) 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", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["target_id", 1104], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 211]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1105], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 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" = 1105 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'G0PaLOoa10NpM8ldDRJ0yQlMXQKx6AKVdNbVh2lqE5dA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["target_id", 1105], ["target_type", "User"], ["token", "G0PaLOoa10NpM8ldDRJ0yQlMXQKx6AKVdNbVh2lqE5dA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"G0PaLOoa10NpM8ldDRJ0yQlMXQKx6AKVdNbVh2lqE5dA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'G0PaLOoa10NpM8ldDRJ0yQlMXQKx6AKVdNbVh2lqE5dA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'G0PaLOoa10NpM8ldDRJ0yQlMXQKx6AKVdNbVh2lqE5dA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1105]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1105) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00], ["target_id", 1105], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 287 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:29:08 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1106 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1106], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1106 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) 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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 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" = 1107 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1107], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1108], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1109], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1168 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1110], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1169 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:29:09 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1111], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 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" = 1111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1170 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:29:09 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1112], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1171 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:29:09 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1113], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1114], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1173 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1114 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1173) 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", 1173]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1114]] NewPostNotification Load (0.3ms) 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" = 1114 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1115 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1115], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1115 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1115], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1115 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1115 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1175 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1115 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1175)  (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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 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" = 1116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1116], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1176 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) 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", 1176]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1116]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1116 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9m5GM7dgHCBokBtuPGlVVQfW8azIIS3IGh7zX9ej637Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1116], ["target_type", "User"], ["token", "9m5GM7dgHCBokBtuPGlVVQfW8azIIS3IGh7zX9ej637Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.6ms) Date: Thu, 05 Mar 2015 16:29:09 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e9a5227b0_dd383ff079065be04283c@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1117], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1117 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1177 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1118], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1118) 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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1118], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1178]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1118]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1119], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1179]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1119]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1119 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1120], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1180 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1180]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1120]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1120 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1120 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2yeepHYuS4Hb41saslu2xQ_hkUvyhvmElCGvSaHHwNRw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1120], ["target_type", "User"], ["token", "2yeepHYuS4Hb41saslu2xQ_hkUvyhvmElCGvSaHHwNRw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.6ms) Date: Thu, 05 Mar 2015 16:29:09 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7e9a531c58_dd383ff079065be04299a@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1121], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1181]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1121]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1121 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1122 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1122], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 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", 1182]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1122]] NewPostNotification Load (0.3ms) 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" = 1122 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1122]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1122 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1182 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1123 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1123], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1123 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1123], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.5ms) 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", 1184]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1123]] 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" = 1123 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1123]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1123 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1183 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1123]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1123 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1184 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1124 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1124], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) 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" = 1124 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JyOSdwRECSze8uku74KG7QUn3HXcd5qoBt5tJeYSw-0w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1124], ["target_type", "User"], ["token", "JyOSdwRECSze8uku74KG7QUn3HXcd5qoBt5tJeYSw-0w"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1125 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1125], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1125 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z6kB0wa2zLQ2f-iJJi01UgiJEyQWoG5y6qfvv_bZjtOA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1125], ["target_type", "User"], ["token", "z6kB0wa2zLQ2f-iJJi01UgiJEyQWoG5y6qfvv_bZjtOA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1125 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1126 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["state", "pending"], ["target_id", 1126], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1126 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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" = 'xILHv9OuFgBAPNcHesxZqgcWj8MURwd9CtyBfcUSvHTA' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1126], ["target_type", "User"], ["token", "xILHv9OuFgBAPNcHesxZqgcWj8MURwd9CtyBfcUSvHTA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 292 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) 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" = 1126 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fMcbP029qfA1wzHEPQfltgspfSphU7-6oZdilG3S7yww' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1126], ["target_type", "User"], ["token", "fMcbP029qfA1wzHEPQfltgspfSphU7-6oZdilG3S7yww"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1127) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1127], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 214 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1127) 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" = 1127 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1128) LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1128], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 215 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1128) LIMIT 1  (0.1ms) 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" = 1128 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) 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" = 1129) 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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1129], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 216 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1129) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1129) LIMIT 1  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1129 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" = 1129 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 216]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1129 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1130 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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1130], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eaDHqRGfxF71VxOS_FTFuwih98VwhxLAKqCChZgo_XNA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1131], ["target_type", "User"], ["token", "eaDHqRGfxF71VxOS_FTFuwih98VwhxLAKqCChZgo_XNA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eaDHqRGfxF71VxOS_FTFuwih98VwhxLAKqCChZgo_XNA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yTLifGtVq3LSIvFOawYZYwAPiRj8T1kCM8rb47firkzg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1132], ["target_type", "User"], ["token", "yTLifGtVq3LSIvFOawYZYwAPiRj8T1kCM8rb47firkzg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 295 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yTLifGtVq3LSIvFOawYZYwAPiRj8T1kCM8rb47firkzg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'L7LDKAFS7tfBrX48iIXy7w7CLctN4LnnY6LwAUOo7cEw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1133], ["target_type", "User"], ["token", "L7LDKAFS7tfBrX48iIXy7w7CLctN4LnnY6LwAUOo7cEw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 296 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.1ms) 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" = '-pxSLfcaoAot26QYHzRiEgHjJwyhQkmdBKuKggxyIhrw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00], ["target_id", 1134], ["target_type", "User"], ["token", "-pxSLfcaoAot26QYHzRiEgHjJwyhQkmdBKuKggxyIhrw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:29:09 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) 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" = 1136 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1136], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1136 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1136 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 6.3ms | ActiveRecord: 1.0ms)  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1137 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1137], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1137 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1137], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1137 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1137], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1137 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 28ms (Views: 27.1ms | ActiveRecord: 0.4ms)  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1138 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1138], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1138 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1138], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1138 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1138], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1193"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1138 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1193') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1138]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1138 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1193 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.3ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1193 ORDER BY "notify_user_notifications"."id" ASC 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) 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" = 1139 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1139], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1139 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1139], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1139 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1139], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1196"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1139 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1196') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1139]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1139 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1196 [["state", "read"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1196"} NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1139 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1196') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1140 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1140], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1140 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1140], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1140 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1140], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1140 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1140 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1141 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1141], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1202"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1141 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1202')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1141 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1202')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1202]]  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1142 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1142], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1203"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1142 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1203')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1142 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1203')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1143 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1143], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1143 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1143 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1143) LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1143], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1143 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.2ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1143 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1144 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1144], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1144 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1144 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1144 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1144 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) 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" = 1145 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1145], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1145) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1145], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1145 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1146 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1146], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1146) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1146], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1146 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 219]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1147 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1147], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1147 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TDuaxsfQR-Wph9xDMWAUWQtN4NhVThwuhyR2ANa6GDtA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1147], ["target_type", "User"], ["token", "TDuaxsfQR-Wph9xDMWAUWQtN4NhVThwuhyR2ANa6GDtA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"TDuaxsfQR-Wph9xDMWAUWQtN4NhVThwuhyR2ANa6GDtA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TDuaxsfQR-Wph9xDMWAUWQtN4NhVThwuhyR2ANa6GDtA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TDuaxsfQR-Wph9xDMWAUWQtN4NhVThwuhyR2ANa6GDtA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1147]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1147) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1147], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 298 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) 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 (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1148 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1148], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1148 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1149 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1149], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1150 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1150], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1151 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1151], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1151 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1212 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1152 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1152], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1152 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1213 [["params", {"listing_id"=>1}], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1153 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1153], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1153 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1214 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:31:11 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1154 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1154], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1154 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1215 [["params", {:listing_id=>1}], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1155 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1155], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1155 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1156 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1156], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1156 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1156 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1217 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1156 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1217) 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", 1217]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1156]] NewPostNotification Load (0.3ms) 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" = 1156 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1157 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1157], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1157 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1157], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1157 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1157 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1219 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1157 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1219)  (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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1158 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1158], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1158 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" = 1158 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1220 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1220]] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1158]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1158 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1158 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uVK6OAQd-XwhK0Po9qJP8gQWX7Zvk76xCCUKtTpfD3iA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1158], ["target_type", "User"], ["token", "uVK6OAQd-XwhK0Po9qJP8gQWX7Zvk76xCCUKtTpfD3iA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.4ms) Date: Thu, 05 Mar 2015 16:31:11 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7ea1fd368a_df8f3ff8cd065be8339fa@Antons-MacBook-Pro.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.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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1159 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1159], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1159 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1221 [["state", "pending_no_aggregation"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1160 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1160], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1160) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1160], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1222]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1160]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1160 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1161 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1161], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1223]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1161]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1161 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1162], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 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" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1224 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1224]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1162]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1162 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '07FKiXFuA7i5PAmhxB0FTg9l3T0QV2bT5FiVLEkPRPvA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1162], ["target_type", "User"], ["token", "07FKiXFuA7i5PAmhxB0FTg9l3T0QV2bT5FiVLEkPRPvA"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.3ms) Date: Thu, 05 Mar 2015 16:31:11 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54f7ea1fe45a6_df8f3ff8cd065be8340bb@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1163], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1225]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1163]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1164 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1164], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1226]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1164]] 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" = 1164 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1164]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1164 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1226 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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" = 1165 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1165], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1165 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1165], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1228]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1165]] 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" = 1165 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1165]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1165 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1227 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1165]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1165 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1228 [["state", "sent"], ["updated_at", Thu, 05 Mar 2015 05:31:11 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", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1166 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1166], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1166 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'IexhQ0q-7FLHEsf8DqJYdwX5R_CICaAeIUaeRgoEcyXg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["target_id", 1166], ["target_type", "User"], ["token", "IexhQ0q-7FLHEsf8DqJYdwX5R_CICaAeIUaeRgoEcyXg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00], ["state", "pending"], ["target_id", 1167], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1167 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z18NPG9a-zCIDJOn8zI-OAv-uzmZFBHjqZnp2_nw57Yw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1167], ["target_type", "User"], ["token", "z18NPG9a-zCIDJOn8zI-OAv-uzmZFBHjqZnp2_nw57Yw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1167 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 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" = 1168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["state", "pending"], ["target_id", 1168], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1168 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YHzTvearMCltQZR2-lIt0QFp5PZiNYH_hQ3yV7BJdkrQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1168], ["target_type", "User"], ["token", "YHzTvearMCltQZR2-lIt0QFp5PZiNYH_hQ3yV7BJdkrQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 303 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1168 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'X0i0ld1SK3a4-ra72_0yxQB_l38ZD6U2fFFt2TgFzIeQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1168], ["target_type", "User"], ["token", "X0i0ld1SK3a4-ra72_0yxQB_l38ZD6U2fFFt2TgFzIeQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1169) 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", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1169], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 222 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1169) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1169 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1170) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1170], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 223 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1170) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1170 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1171) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1171], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1171) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1171) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1171 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1171 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 224]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1171 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1172 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", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1172], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JlzCZHFJgElABggiaR-QRwdi1wZFyX7UxjNqlYUQ9zYg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1173], ["target_type", "User"], ["token", "JlzCZHFJgElABggiaR-QRwdi1wZFyX7UxjNqlYUQ9zYg"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JlzCZHFJgElABggiaR-QRwdi1wZFyX7UxjNqlYUQ9zYg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) 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" = 'awKQuGFNRuRXjbbIklIa7gjbPIs4UpTdXaT7Ag4KjwXw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1174], ["target_type", "User"], ["token", "awKQuGFNRuRXjbbIklIa7gjbPIs4UpTdXaT7Ag4KjwXw"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 306 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'awKQuGFNRuRXjbbIklIa7gjbPIs4UpTdXaT7Ag4KjwXw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vvmeEKhueoV69EGFugA9zwEzX7kWRCSvomjL7is1Fk7A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1175], ["target_type", "User"], ["token", "vvmeEKhueoV69EGFugA9zwEzX7kWRCSvomjL7is1Fk7A"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 307 [["active", false], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vHPvq36X7nh4OedYcXqTIgFjOt9Zc5eTVU7qFjwx-OwQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00], ["target_id", 1176], ["target_type", "User"], ["token", "vHPvq36X7nh4OedYcXqTIgFjOt9Zc5eTVU7qFjwx-OwQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 05 Mar 2015 05:31:12 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (38.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 14ms (Views: 10.7ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (19.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1178 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (2.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1178], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1178 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (15.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1178 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 31ms (Views: 10.4ms | ActiveRecord: 15.5ms)  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1179 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1179], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1179 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1179], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1179 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1179], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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" = 1179 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 41ms (Views: 39.5ms | ActiveRecord: 0.6ms)  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1180], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1180], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1180], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1237"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1180 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1237') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1180]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (7.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1237 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 2.2ms | ActiveRecord: 9.0ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1237 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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" = 1181 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1181], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1181], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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" = 1181 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1181], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1240"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1181 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1240') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1181]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1240 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 2.1ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1240"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1181 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1240') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.6ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1182 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1182], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1182 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1182], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1182 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1182], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1182 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1182 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1183 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1183], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1246"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1183 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1246')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1183 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1246')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1246]]  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1184 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1184], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1247"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1184 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1247')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1184 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1247')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1185 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1185], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1185 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1185 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1185) LIMIT 1 SQL (12.9ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1185], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1185 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 30ms (Views: 0.4ms | ActiveRecord: 14.5ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1185 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1186], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1187], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1187) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1187], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1188 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1188], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1188) 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1188], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1188 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", 227]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1189], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (1.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1189 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'okPq1qKn4fCwxKH2lXDuYAkobT-YcFoRKT-P_OvVQduA' LIMIT 1 SQL (1.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1189], ["target_type", "User"], ["token", "okPq1qKn4fCwxKH2lXDuYAkobT-YcFoRKT-P_OvVQduA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"okPq1qKn4fCwxKH2lXDuYAkobT-YcFoRKT-P_OvVQduA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'okPq1qKn4fCwxKH2lXDuYAkobT-YcFoRKT-P_OvVQduA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'okPq1qKn4fCwxKH2lXDuYAkobT-YcFoRKT-P_OvVQduA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1189]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1189) 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1189], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 309 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1190 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1190], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1190 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1191], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1192 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1192], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1193 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1193], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1193 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1256 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1194 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1194], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1194 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1257 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1195 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1195], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1195 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1258 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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" = 1196 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1196], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1196 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1259 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:06:34 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1197 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1197], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1197 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1198 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1198], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1198 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1198 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1261 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1198 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1261) 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", 1261]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1198]] NewPostNotification Load (0.3ms) 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" = 1198 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1199 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1199], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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" = 1199 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1199], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1199 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1199 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1263 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1199 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1263)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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" = 1200 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1200], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1200 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1200 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1264 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:34 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", 1264]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1200]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1200 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1200 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oZIVF7wR_QojcJJHVBq0HwcGgKqE-zv0tPgoqqO7lPNg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1200], ["target_type", "User"], ["token", "oZIVF7wR_QojcJJHVBq0HwcGgKqE-zv0tPgoqqO7lPNg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.4ms) Date: Thu, 12 Mar 2015 10:06:34 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ca7add6a4_8133fde94865be8854d4@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1201 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1201], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1201 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1265 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1202 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1202], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1202) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1202], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1266]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1202]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1202 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1203 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1203], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1267]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1203]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1203 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1204 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1204], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1204 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1204 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1268 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1268]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1204]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1204 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1204 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9Z7SPz0vAoSmtm7k9nKZawyOhIC8tdB4I66nfdjbmqkg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["target_id", 1204], ["target_type", "User"], ["token", "9Z7SPz0vAoSmtm7k9nKZawyOhIC8tdB4I66nfdjbmqkg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Thu, 12 Mar 2015 10:06:34 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ca7aed8b5_8133fde94865be885568@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1205 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1205], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1269]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1205]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1205 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00], ["state", "pending"], ["target_id", 1206], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1270]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1206]] NewPostNotification Load (0.3ms) 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" = 1206 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1206]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1270 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:34 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["state", "pending"], ["target_id", 1207], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["state", "pending"], ["target_id", 1207], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1272]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1207]] 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" = 1207 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1207]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1271 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1207]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1272 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:06:35 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", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1208 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["state", "pending"], ["target_id", 1208], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1208 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5NZPhnUdlPvFpR634ykJqQaglpxk8GuRJ_NKU7vx-qmg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1208], ["target_type", "User"], ["token", "5NZPhnUdlPvFpR634ykJqQaglpxk8GuRJ_NKU7vx-qmg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 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", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1209 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["state", "pending"], ["target_id", 1209], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1209 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HLd_kAWA5msA0GHhrKrv_QnX6V87eRMBmOIhwpNa62jg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1209], ["target_type", "User"], ["token", "HLd_kAWA5msA0GHhrKrv_QnX6V87eRMBmOIhwpNa62jg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1209 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1210 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["state", "pending"], ["target_id", 1210], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1210 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TzHAPfpJmr-JpAxDc3fPEgC50SFk1dfdt4humk6GFXFQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1210], ["target_type", "User"], ["token", "TzHAPfpJmr-JpAxDc3fPEgC50SFk1dfdt4humk6GFXFQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 314 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1210 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kBILAJUfHDctY0PfHC9njwsa42imK4UiMd0z48Msji3w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1210], ["target_type", "User"], ["token", "kBILAJUfHDctY0PfHC9njwsa42imK4UiMd0z48Msji3w"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1211) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1211], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 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" != 230 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1211) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1212) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1212], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1212) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1212 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1213) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1213], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1213) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1213) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1213 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1213 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 232]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1213 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1214 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", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1214], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) 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" = '38H1YJBCmhvbVZH3Vuv8WwoM9YI8U_e8hMgMY57KVtJQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1215], ["target_type", "User"], ["token", "38H1YJBCmhvbVZH3Vuv8WwoM9YI8U_e8hMgMY57KVtJQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '38H1YJBCmhvbVZH3Vuv8WwoM9YI8U_e8hMgMY57KVtJQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OUJfR_Mad61jp5FVF_SPqQb9eZGzfQ_8I1aWL2Dio_0A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1216], ["target_type", "User"], ["token", "OUJfR_Mad61jp5FVF_SPqQb9eZGzfQ_8I1aWL2Dio_0A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 317 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OUJfR_Mad61jp5FVF_SPqQb9eZGzfQ_8I1aWL2Dio_0A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) 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", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zsXv1IZc1J3Y4JrVdX95Gglv4KDLNT3IJgC-62cknvig' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1217], ["target_type", "User"], ["token", "zsXv1IZc1J3Y4JrVdX95Gglv4KDLNT3IJgC-62cknvig"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 318 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OZzP0jViP54k7pl3syXTJgvn17nxAOtlnMo0oTd3568Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00], ["target_id", 1218], ["target_type", "User"], ["token", "OZzP0jViP54k7pl3syXTJgvn17nxAOtlnMo0oTd3568Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:06:35 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (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.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 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" = 1220 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1220], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1220 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1220 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 6.1ms | ActiveRecord: 1.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1221 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1221], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1221 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1221], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1221 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1221], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) 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" = 1221 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 25ms (Views: 24.1ms | ActiveRecord: 0.6ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.8ms) 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" = 1222 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1222], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1222 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1222], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1222 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1222], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1281"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1222 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1281') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1222]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1222 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1281 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1281 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) 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" = 1223 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1223 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 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" = 1223 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1284"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1223 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1284') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1223]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1223 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1284 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1284"} NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1223 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1284') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.2ms)  (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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1224 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1224 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1225 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1225], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1290"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1225 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1290')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1225 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1290')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms) 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", 1290]]  (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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) 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" = 1226 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1226], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1291"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1226 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1291')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1226 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1291')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.6ms)  (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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1227], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1227) 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["target_id", 1227], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1228], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1229 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1229], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1229) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["target_id", 1229], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1229 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1230 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1230], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1230) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["target_id", 1230], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1230 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 235]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1231 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", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1231], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) 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" = 1231 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qQyslqGeCQ_d7MNobaUKcgqJ44Z0eZdEL99rVSHkMYVA' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["target_id", 1231], ["target_type", "User"], ["token", "qQyslqGeCQ_d7MNobaUKcgqJ44Z0eZdEL99rVSHkMYVA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"qQyslqGeCQ_d7MNobaUKcgqJ44Z0eZdEL99rVSHkMYVA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qQyslqGeCQ_d7MNobaUKcgqJ44Z0eZdEL99rVSHkMYVA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qQyslqGeCQ_d7MNobaUKcgqJ44Z0eZdEL99rVSHkMYVA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1231]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1231) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00], ["target_id", 1231], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 320 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:08:48 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) 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 (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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1232], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1233], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1233 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 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" = 1234 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1234], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1235], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1236 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1236], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1236 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1301 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1237 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1237], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1237 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1302 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1238 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1238], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1238 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1303 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:08:49 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.5ms) 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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1239 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1239], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1239 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1304 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1240 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1240], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1240 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1241], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1306 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1241 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1306) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1306]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1241]] NewPostNotification Load (0.3ms) 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" = 1241 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 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" = 1242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1242], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1242], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1308 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1242 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1308)  (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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) 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" = 1243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1243], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1309 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 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", 1309]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1243]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1243 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xSRYhmZYaZAnr1JAHBn6AgYi1nA1FqlklGfCJYFXgdGA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1243], ["target_type", "User"], ["token", "xSRYhmZYaZAnr1JAHBn6AgYi1nA1FqlklGfCJYFXgdGA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.6ms) Date: Thu, 12 Mar 2015 10:08:49 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb012d335_af23fd5b9c65bf084439@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1244 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1244], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1244 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1310 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1245], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1245) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1245], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1311]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1245]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1246], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1312]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1246]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1247 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1247], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1247 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1247 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1313 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 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", 1313]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1247]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1247 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1247 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kUeZm2jML4lfj14pBFlNLQASgwI7oqoC9HgonDKhI32Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1247], ["target_type", "User"], ["token", "kUeZm2jML4lfj14pBFlNLQASgwI7oqoC9HgonDKhI32Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.0ms) Date: Thu, 12 Mar 2015 10:08:49 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb013cb13_af23fd5b9c65bf0845d7@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1248 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1248], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1314]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1248]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1248 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1249], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1315]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1249]] NewPostNotification Load (0.3ms) 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" = 1249 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1249]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1249 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1315 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1250], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1250], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1317]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1250]] 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" = 1250 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1250]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1316 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1250]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1317 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1251 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1251], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1251 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OaVU3d_4z7rA2mGClC0JBQYi4mMftwiACKje52zuSbew' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1251], ["target_type", "User"], ["token", "OaVU3d_4z7rA2mGClC0JBQYi4mMftwiACKje52zuSbew"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1252 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1252], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1252 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VFKAokII_X_HMPm0W6Kxgg6KbfbjcAV7-LzXKNvaI6Yw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1252], ["target_type", "User"], ["token", "VFKAokII_X_HMPm0W6Kxgg6KbfbjcAV7-LzXKNvaI6Yw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1252 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1253 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["state", "pending"], ["target_id", 1253], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1253 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ssSd_1IWrjJ9dw89KfoNMAp7Yux6K9eqqnbskWRkEM6g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1253], ["target_type", "User"], ["token", "ssSd_1IWrjJ9dw89KfoNMAp7Yux6K9eqqnbskWRkEM6g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 325 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1253 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xJV-CwKFDDAXiQdywlGEpAUMsPJvOO184VFF9kVxsPjg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1253], ["target_type", "User"], ["token", "xJV-CwKFDDAXiQdywlGEpAUMsPJvOO184VFF9kVxsPjg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1254) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1254], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 238 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1254) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1254 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1255) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 239 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1255) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1255 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1256) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1256], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 240 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1256) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1256) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 240]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1257 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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 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", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) 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" = '1azozxLBiZVb7nFsQBTyPQW-EnLoRalZ2aSfjM8Jh0lA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1258], ["target_type", "User"], ["token", "1azozxLBiZVb7nFsQBTyPQW-EnLoRalZ2aSfjM8Jh0lA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1azozxLBiZVb7nFsQBTyPQW-EnLoRalZ2aSfjM8Jh0lA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YSPbuOo65nB7rQgUoj0xEAQwoa0nE3G8ih9HcPTHMcqA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1259], ["target_type", "User"], ["token", "YSPbuOo65nB7rQgUoj0xEAQwoa0nE3G8ih9HcPTHMcqA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 328 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YSPbuOo65nB7rQgUoj0xEAQwoa0nE3G8ih9HcPTHMcqA' 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lz5_M9aEex4NvZlzpQvQLgMdCDPqRyNI60hk1ObymMSw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1260], ["target_type", "User"], ["token", "lz5_M9aEex4NvZlzpQvQLgMdCDPqRyNI60hk1ObymMSw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 329 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NvgLbJjkYc35I2AnzuJg9Q-S8izMjTNDgbF3qBrs01tQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00], ["target_id", 1261], ["target_type", "User"], ["token", "NvgLbJjkYc35I2AnzuJg9Q-S8izMjTNDgbF3qBrs01tQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:08:49 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.0ms)  (0.3ms) 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1263 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1263], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1263 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1263 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.0ms | ActiveRecord: 1.1ms)  (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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1264 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1264], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1264 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1264], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1264 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1264], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 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" = 1264 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 26ms (Views: 24.3ms | ActiveRecord: 0.6ms)  (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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1265 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1265], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1265 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1265], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1265 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1265], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1326"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1265 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1326') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1265]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1265 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1326 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.2ms | ActiveRecord: 2.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1326 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1266 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1266], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1266 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1266], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1266 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1266], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1329"} NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1266 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1329') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1266]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1266 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1329 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.3ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1329"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1266 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1329') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.7ms)  (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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1267 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1267], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1267 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1267], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1267 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1267], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1267 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1267 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1268 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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1268], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1335"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1268 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1335')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1268 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1335')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1335]]  (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", Wed, 11 Mar 2015 23:09:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:02 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1269 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1269], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1336"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1269 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1336')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1269 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1336')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1270 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1270], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1270 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1270 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1270) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1270], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1270 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1270 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1271], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Processing by NotifyUser::NotificationsController#subscriptions as HTML Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]} NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (1.1ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1272 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1272], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1272) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1272], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1272 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1273 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1273], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1273) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1273], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1273 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 243]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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" = 1274 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1274], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) 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" = 1274 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.7ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EJG9I-5YwuD_bq3PcscDjw_UmbntbbD3oIHgezcyrt3A' LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1274], ["target_type", "User"], ["token", "EJG9I-5YwuD_bq3PcscDjw_UmbntbbD3oIHgezcyrt3A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"EJG9I-5YwuD_bq3PcscDjw_UmbntbbD3oIHgezcyrt3A"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EJG9I-5YwuD_bq3PcscDjw_UmbntbbD3oIHgezcyrt3A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EJG9I-5YwuD_bq3PcscDjw_UmbntbbD3oIHgezcyrt3A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1274]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1274) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1274], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 331 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1275 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1275], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1276 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1276], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1276 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1277 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1277], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1278 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1278], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1279 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1279], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1279 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1346 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:03 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') 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1280], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1347 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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" = 1281 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1281], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1281 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1348 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) 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" = 1282 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1282], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1282 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1349 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.3ms) 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.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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1283], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1284 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1284], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1284 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1284 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1351 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1284 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1351) 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", 1351]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1284]] NewPostNotification Load (0.3ms) 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" = 1284 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1285], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1285], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1353 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1285 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1353)  (0.1ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) 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" = 1286 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1286], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1286 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1286 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1354 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1354]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1286]]  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1286 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1286 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'wro2qppFYtVnjRWKcJ635QxKG7AGj9fcekhbGQmEGFqA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1286], ["target_type", "User"], ["token", "wro2qppFYtVnjRWKcJ635QxKG7AGj9fcekhbGQmEGFqA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (9.2ms) Date: Thu, 12 Mar 2015 10:09:03 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb0f5677f_cf53fd045065be489855@Antons-MacBook-Pro.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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1287 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1287], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1287 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1355 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1288 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1288], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1288) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1288], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1356]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1288]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1288 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1289 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1289], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1357]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1289]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1289 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1290 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1290], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1290 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1290 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1358 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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", 1358]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1290]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1290 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1290 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XCHOwDPcW3BtdsnnoJQRCQJV7G1-dRlErA3WdcZWRFKw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1290], ["target_type", "User"], ["token", "XCHOwDPcW3BtdsnnoJQRCQJV7G1-dRlErA3WdcZWRFKw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.5ms) Date: Thu, 12 Mar 2015 10:09:03 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb0f665f1_cf53fd045065be4899bb@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1291 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1291], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1359]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1291]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1291 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1292 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1292], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1360]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1292]] NewPostNotification Load (0.3ms) 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" = 1292 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1292]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1292 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1360 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1293 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1293], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1293 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1293], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1362]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1293]] 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" = 1293 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1293]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1293 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1361 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1293]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1293 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1362 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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" = 1294 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1294], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1294 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pNoGjDQQ5E9Q9gAL_VScrQGCI1GjEr-svFjeusetr47A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1294], ["target_type", "User"], ["token", "pNoGjDQQ5E9Q9gAL_VScrQGCI1GjEr-svFjeusetr47A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1295 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1295], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1295 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5n7T1F-5W2nJyft27BFqtwSBZuipUuHtTICUaUQbe1-Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1295], ["target_type", "User"], ["token", "5n7T1F-5W2nJyft27BFqtwSBZuipUuHtTICUaUQbe1-Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1295 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1296 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["state", "pending"], ["target_id", 1296], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1296 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vwvR732hjfn1RqxrHH6kuQKXzZBpQiHkjePEvI5YvPoA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1296], ["target_type", "User"], ["token", "vwvR732hjfn1RqxrHH6kuQKXzZBpQiHkjePEvI5YvPoA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 336 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1296 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QkQMNi33UdhPvI10BfMxJgqqhZdz9lY6KIHYXy_nHjmw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1296], ["target_type", "User"], ["token", "QkQMNi33UdhPvI10BfMxJgqqhZdz9lY6KIHYXy_nHjmw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1297) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1297], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 246 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1297) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1297 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1298) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1298], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 247 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1298) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1298 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1299) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1299], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 248 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1299) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1299) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 248]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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" = 1300 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1300], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'MXJXqanqPFbNms-ZWD9iBwcLDApMW6WKlsta-5aC9Oyw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1301], ["target_type", "User"], ["token", "MXJXqanqPFbNms-ZWD9iBwcLDApMW6WKlsta-5aC9Oyw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'MXJXqanqPFbNms-ZWD9iBwcLDApMW6WKlsta-5aC9Oyw' 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", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Z3QH2nHYlzbu_FKxDqHr8wDmEAApOQwZ7TXMyT9_oLDw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1302], ["target_type", "User"], ["token", "Z3QH2nHYlzbu_FKxDqHr8wDmEAApOQwZ7TXMyT9_oLDw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 339 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Z3QH2nHYlzbu_FKxDqHr8wDmEAApOQwZ7TXMyT9_oLDw' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nagbO9wrD306hnkcYuZafA0uylgBB4ITUDO-uOKL1JDQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1303], ["target_type", "User"], ["token", "nagbO9wrD306hnkcYuZafA0uylgBB4ITUDO-uOKL1JDQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 340 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:03 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" = 'UITum9GCIl6Xa67bdfPBtwVIpwOQ1M1ToDWE6QE10vtw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00], ["target_id", 1304], ["target_type", "User"], ["token", "UITum9GCIl6Xa67bdfPBtwVIpwOQ1M1ToDWE6QE10vtw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:03 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.0ms)  (0.3ms) 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:15 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" = 1306 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1306], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1306 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1306 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 6.0ms | ActiveRecord: 1.1ms)  (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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1307 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1307], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1307 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1307], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1307 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1307], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1307 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 20ms (Views: 18.9ms | ActiveRecord: 0.4ms)  (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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1308 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1308], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1308 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1308], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1308 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1308], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1371"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1308 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1371') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1308]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1308 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1371 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.2ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1371 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1309 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", Wed, 11 Mar 2015 23:09:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1309], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:15 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1309 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1309], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1309 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1309], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1374"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1309 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1374') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1309]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1309 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1374 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1374"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1309 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1374') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1310 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1310], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1310 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1310], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1310 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1310], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1310 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1310 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1311 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1311], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1380"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1311 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1380')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1311 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1380')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1380]]  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1312 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1312], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1381"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1312 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1381')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1312 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1381')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (0.2ms) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1313], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1313) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1313], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1314 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1314], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1314 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1314 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1314 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1314 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1315 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1315], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1315) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1315], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1315 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1316 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1316], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1316) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1316], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1316 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 251]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1317 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1317], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1317 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xRYif0saw_sJfNznY4kp-ARNAfTaw7CGvMIfA3fxPFdA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1317], ["target_type", "User"], ["token", "xRYif0saw_sJfNznY4kp-ARNAfTaw7CGvMIfA3fxPFdA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"xRYif0saw_sJfNznY4kp-ARNAfTaw7CGvMIfA3fxPFdA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xRYif0saw_sJfNznY4kp-ARNAfTaw7CGvMIfA3fxPFdA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xRYif0saw_sJfNznY4kp-ARNAfTaw7CGvMIfA3fxPFdA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1317]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1317) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1317], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 342 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.4ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.4ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1318 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1318], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1319 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1319], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1319 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1320 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1320], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1321 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1321], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1322], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1391 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1323 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1323], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1323 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1392 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:16 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1324 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1324], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1324 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1393 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1325 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1325], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1325 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1394 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1326 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1326], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1326 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1327 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1327], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1327 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1327 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1396 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1327 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1396) 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", 1396]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1327]] NewPostNotification Load (0.3ms) 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" = 1327 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1328 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1328], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1328 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1328], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1328 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1328 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1398 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1328 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1398)  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) 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" = 1329 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1329], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1329 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1329 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1399 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1399]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1329]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1329 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1329 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VVX_aHZPeVcK04mQCvpwCwp5Ec44mIwROtTH1izUJ5NA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1329], ["target_type", "User"], ["token", "VVX_aHZPeVcK04mQCvpwCwp5Ec44mIwROtTH1izUJ5NA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.5ms) Date: Thu, 12 Mar 2015 10:09:16 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb1c5f2a1_efa3fe208465be8619b2@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1330 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1330], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 1330 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1400 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1331 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1331], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1331) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1331], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1401]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1331]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1331 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1332 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1332], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1402]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1332]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1332 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1333 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1333], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1333 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1333 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1403 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1403]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1333]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1333 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1333 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rs6RBnKY0I7zTSGpZif5Owa0D_i6zJ55ERo6TFPmH90g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1333], ["target_type", "User"], ["token", "rs6RBnKY0I7zTSGpZif5Owa0D_i6zJ55ERo6TFPmH90g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Thu, 12 Mar 2015 10:09:16 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb1c6e778_efa3fe208465be862048@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1334 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1334], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1404]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1334]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1334 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1335 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1335], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1405]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1335]] 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" = 1335 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1335]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1335 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1405 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1336 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1336], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1336 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1336], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1407]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1336]] 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" = 1336 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1336]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1336 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1406 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1336]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1336 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1407 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1337 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1337], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1337 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8zeF0xJ5uJGmFfn_zD-K7wSxMuqHbKFSe3--DYH8IdSg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1337], ["target_type", "User"], ["token", "8zeF0xJ5uJGmFfn_zD-K7wSxMuqHbKFSe3--DYH8IdSg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1338 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1338], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1338 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'acRQI7qHXfeOC4xOE_htqQeFHF8EgB_8JQHGNy1EyHnA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1338], ["target_type", "User"], ["token", "acRQI7qHXfeOC4xOE_htqQeFHF8EgB_8JQHGNy1EyHnA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1338 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1339 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["state", "pending"], ["target_id", 1339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1339 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cCXx5PaiodQmiRGxRGEqMQNakOlvjbHhjAs5Lpcl1v2g' LIMIT 1 SQL (6.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1339], ["target_type", "User"], ["token", "cCXx5PaiodQmiRGxRGEqMQNakOlvjbHhjAs5Lpcl1v2g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 347 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1339 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Uk8kX9ahCXzIGHKygiXbqA8ZcElhawJFfS9CqXNCuAdg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1339], ["target_type", "User"], ["token", "Uk8kX9ahCXzIGHKygiXbqA8ZcElhawJFfS9CqXNCuAdg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1340) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 254 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1340) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1340 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1341) 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1341], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 255 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1341) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1341 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1342) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1342], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1342) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1342) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1342 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1342 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 256]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1342 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1343 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1343], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZOhfQO9WAGcMxZdYZWUM6gl7A6ynNVtO1XsTZog_ThbA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1344], ["target_type", "User"], ["token", "ZOhfQO9WAGcMxZdYZWUM6gl7A6ynNVtO1XsTZog_ThbA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZOhfQO9WAGcMxZdYZWUM6gl7A6ynNVtO1XsTZog_ThbA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5SqZg0lpN19w-3Aw9WBUyg0mUAhJDaT9g0lAZFCb9gQQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1345], ["target_type", "User"], ["token", "5SqZg0lpN19w-3Aw9WBUyg0mUAhJDaT9g0lAZFCb9gQQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 350 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5SqZg0lpN19w-3Aw9WBUyg0mUAhJDaT9g0lAZFCb9gQQ' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JSjFx3u96tE6YIYHWSwhEAP2yYpl15ygu-ArnyZwz3uw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1346], ["target_type", "User"], ["token", "JSjFx3u96tE6YIYHWSwhEAP2yYpl15ygu-ArnyZwz3uw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 351 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:09:16 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", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:09:16 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" = 'PpLYA9HOUeOcG7KDyLpiegSeROk0iqCj9Mz0DeyGLfXw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00], ["target_id", 1347], ["target_type", "User"], ["token", "PpLYA9HOUeOcG7KDyLpiegSeROk0iqCj9Mz0DeyGLfXw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:09:16 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:39 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" = 1349 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1349], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1349 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1349 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 6.2ms | ActiveRecord: 1.0ms)  (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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1350 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1350], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1350 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1350], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1350 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1350], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1350 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 22ms (Views: 20.4ms | ActiveRecord: 0.4ms)  (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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1351 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1351], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1351 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1351], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1351 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1351], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1416"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1351 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1416') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1351]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1351 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1416 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.1ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1416 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1352 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", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1352], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1352 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1352], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1352 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1352], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1419"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1352 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1419') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1352]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1352 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1419 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1419"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1352 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1419') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1353 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1353], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1353 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1353], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1353 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1353], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1353 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1353 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1354 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1354], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1425"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1354 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1425')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1354 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1425')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1425]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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" = 1355 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1355], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1426"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1355 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1426')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1355 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1426')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1356], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1356) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1356], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1357], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1358 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1358], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1358) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1358], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1358 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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" = 1359 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1359], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1359) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1359], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1359 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 259]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1360 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1360], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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" = 1360 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SLlUJcctVSZFbsHly8UMoAJjvBqBx6UrinkoEULM_mMQ' LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1360], ["target_type", "User"], ["token", "SLlUJcctVSZFbsHly8UMoAJjvBqBx6UrinkoEULM_mMQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"SLlUJcctVSZFbsHly8UMoAJjvBqBx6UrinkoEULM_mMQ"} NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SLlUJcctVSZFbsHly8UMoAJjvBqBx6UrinkoEULM_mMQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SLlUJcctVSZFbsHly8UMoAJjvBqBx6UrinkoEULM_mMQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1360]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1360) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1360], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 353 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1361 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1361], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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" = 1362 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1362], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1362 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) 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" = 1363 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1363], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1364 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1364], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1365 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1365], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1365 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1436 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) 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.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1366 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1366], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1366 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1437 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1367], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1438 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1368 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1368], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1368 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1439 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1369 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1369], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1369 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1370 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1370], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1370 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1370 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1441 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1370 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1441) 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", 1441]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1370]] NewPostNotification Load (0.3ms) 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" = 1370 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1371 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1371], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1371 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1371], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1371 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1371 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1443 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1371 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1443)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1372 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1372], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1372 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1372 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1444 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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", 1444]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1372]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1372 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1372 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HZIcfGsXmoF0cIUetowHzgfml9IgOEhtpzBTASeo5OHg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1372], ["target_type", "User"], ["token", "HZIcfGsXmoF0cIUetowHzgfml9IgOEhtpzBTASeo5OHg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.6ms) Date: Thu, 12 Mar 2015 10:10:40 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb705f521_112c3fda18c65bec533c2@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1373 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1373], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1373 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1445 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1374 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1374], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1374) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1374], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1446]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1374]]  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1374 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.3ms) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1375 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1375], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1447]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1375]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1375 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1376 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1376], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1376 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1376 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1448 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1448]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1376]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1376 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1376 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'j0PrcWDCC22O9Cfk5UUxnwHjhaazdPH8I-dv-Q3SafNA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1376], ["target_type", "User"], ["token", "j0PrcWDCC22O9Cfk5UUxnwHjhaazdPH8I-dv-Q3SafNA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.7ms) Date: Thu, 12 Mar 2015 10:10:40 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb706f1b3_112c3fda18c65bec53440@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1377 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1377], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1449]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1377]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1377 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) 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" = 1378 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1378], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1450]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1378]] NewPostNotification Load (0.3ms) 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" = 1378 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1378]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1378 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1450 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1379 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1379], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1379 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1379], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1452]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1379]] NewPostNotification Load (0.3ms) 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" = 1379 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1379]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1379 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1451 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1379]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1379 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1452 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1380 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1380], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1380 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TWALBA5xj7aOtD462unquwSc-IEVSi-ZsUdsdKKyUURw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1380], ["target_type", "User"], ["token", "TWALBA5xj7aOtD462unquwSc-IEVSi-ZsUdsdKKyUURw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1381 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2t7vsCYf2gLM-U8aETusegv5p1369ImJ0_-ijBp5shGA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1381], ["target_type", "User"], ["token", "2t7vsCYf2gLM-U8aETusegv5p1369ImJ0_-ijBp5shGA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1381 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1382 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["state", "pending"], ["target_id", 1382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1382 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9_Dji8YQv8bbLHksXkLPdQFhzJ4IixGNe29w83i3Fmxg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1382], ["target_type", "User"], ["token", "9_Dji8YQv8bbLHksXkLPdQFhzJ4IixGNe29w83i3Fmxg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 358 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1382 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GXrnK1aXeQ8nTMTV2AymkArE4zLmv08f2qPabEBISqNw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1382], ["target_type", "User"], ["token", "GXrnK1aXeQ8nTMTV2AymkArE4zLmv08f2qPabEBISqNw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1383) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 262 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1383) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1383 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.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1384) 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 263 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1384) LIMIT 1  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1384 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1385) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1385], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 264 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1385) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1385) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1385 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1385 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 264]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1385 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1386 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1386], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yhYK2xgaRQ34G_4hZ76FBgoJtfjmOyTSMHQtxG68pDZQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1387], ["target_type", "User"], ["token", "yhYK2xgaRQ34G_4hZ76FBgoJtfjmOyTSMHQtxG68pDZQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yhYK2xgaRQ34G_4hZ76FBgoJtfjmOyTSMHQtxG68pDZQ' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YZTpNh-6A7HtCI6Bger8UwfhL5f0AiqJ1YDWXvYOfwQA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1388], ["target_type", "User"], ["token", "YZTpNh-6A7HtCI6Bger8UwfhL5f0AiqJ1YDWXvYOfwQA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 361 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YZTpNh-6A7HtCI6Bger8UwfhL5f0AiqJ1YDWXvYOfwQA' 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", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Qq4mMF5OSte_cnwRQbTfMwhS6DC8oY-zno0idzEIBWcg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1389], ["target_type", "User"], ["token", "Qq4mMF5OSte_cnwRQbTfMwhS6DC8oY-zno0idzEIBWcg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 362 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:40 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" = 'XXilJbEDqpoc7AXgVpXqfQNG7iDCIPBiQGrXJVEz2yFQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00], ["target_id", 1390], ["target_type", "User"], ["token", "XXilJbEDqpoc7AXgVpXqfQNG7iDCIPBiQGrXJVEz2yFQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) 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" = 1392 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1392], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1392 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1392 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 14ms (Views: 8.6ms | ActiveRecord: 1.1ms)  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1393 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1393], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1393 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1393], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1393 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1393], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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" = 1393 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 24ms (Views: 22.6ms | ActiveRecord: 0.6ms)  (0.9ms) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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" = 1394 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1394], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1394 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1394], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1394 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1394], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1461"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1394 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1461') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1394]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1394 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1461 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1461 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1395 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1395], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1395 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1395], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1395 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1395], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1464"} NotifyUser::BaseNotification Load (1.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1395 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1464') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1395]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1395 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1464 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 3.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1464"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1395 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1464') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.5ms)  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1396 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1396], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1396 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1396], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1396 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1396], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1396 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1396 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1397 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1397], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1470"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1397 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1470')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1397 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1470')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1470]]  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1398 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1398], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1471"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1398 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1471')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1398 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1471')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1399 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1399 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1399 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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" = 1399) LIMIT 1 SQL (0.9ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1399 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1399 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1400], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1401 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1401) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1402 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1402) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 267]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1403 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1403], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) 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" = 1403 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yNGoP9xZvfBEqz2PsZjlmAStE1M-3su6baPeyfqmvdzg' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1403], ["target_type", "User"], ["token", "yNGoP9xZvfBEqz2PsZjlmAStE1M-3su6baPeyfqmvdzg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"yNGoP9xZvfBEqz2PsZjlmAStE1M-3su6baPeyfqmvdzg"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yNGoP9xZvfBEqz2PsZjlmAStE1M-3su6baPeyfqmvdzg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yNGoP9xZvfBEqz2PsZjlmAStE1M-3su6baPeyfqmvdzg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1403]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1403) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1403], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 364 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1404 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1404], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1404 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1405 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1405], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1405 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1406], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1407 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1407], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1408 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1408], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1408 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1481 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1409], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1482 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1410], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1483 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:55 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1411 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1411], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1411 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1484 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1412 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1412], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1412 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1413 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1413], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1413 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1413 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1486 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1413 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1486) 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", 1486]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1413]] NewPostNotification Load (0.3ms) 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" = 1413 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1414], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1414], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1414 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1488 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1414 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1488)  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1415], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.4ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1489 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.3ms) 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", 1489]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1415]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1415 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uMhRBVJVmeTV-OU5d0yUBgAeGuIUUjTOatpreSl4JRQw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1415], ["target_type", "User"], ["token", "uMhRBVJVmeTV-OU5d0yUBgAeGuIUUjTOatpreSl4JRQw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.3ms) Date: Thu, 12 Mar 2015 10:10:55 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb7fb2411_132f3fda60465be87593a@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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" = 1416 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1416], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1416 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1490 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1417 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1417], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1417) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1417], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1491]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1417]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1417 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1418], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1492]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1418]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1418 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1419], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1493 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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", 1493]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1419]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1419 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1419 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DfEf7RO2iVmuOMaNddjh8gBcSBHlJuCe0-PTjlGM1ayw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1419], ["target_type", "User"], ["token", "DfEf7RO2iVmuOMaNddjh8gBcSBHlJuCe0-PTjlGM1ayw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.3ms) Date: Thu, 12 Mar 2015 10:10:55 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cb7fc1b5a_132f3fda60465be876032@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1420 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1420], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1494]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1420]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1420 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1421], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1495]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1421]] NewPostNotification Load (0.3ms) 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" = 1421 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1421]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1421 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1495 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1422], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1422], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1497]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1422]] 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" = 1422 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1422]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1496 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1422]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1422 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1497 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) 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" = 1423 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1423], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1423 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XWmzzLOnzjRpyXNc0xkZ4guRWZxsInYkObRivk0B65sA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1423], ["target_type", "User"], ["token", "XWmzzLOnzjRpyXNc0xkZ4guRWZxsInYkObRivk0B65sA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1424 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1424], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1424 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XbeIwatOqm1DYiTcBASmTgYSZ2TPzLWoHODtQMuByGwA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1424], ["target_type", "User"], ["token", "XbeIwatOqm1DYiTcBASmTgYSZ2TPzLWoHODtQMuByGwA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1424 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1425 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["state", "pending"], ["target_id", 1425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1425 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5TOfTeEWRJAS163HhbpBZAIF4yLRhgGT4Em4Tdya2BzQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1425], ["target_type", "User"], ["token", "5TOfTeEWRJAS163HhbpBZAIF4yLRhgGT4Em4Tdya2BzQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 369 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1425 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Oydp_o2W_ImVNnADTPzfUwMYOyMXKGtWLZzBgPH0K3GA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1425], ["target_type", "User"], ["token", "Oydp_o2W_ImVNnADTPzfUwMYOyMXKGtWLZzBgPH0K3GA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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" = 1426) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 270 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1426) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1426 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1427) 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1427], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 271 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1427) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1428) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1428], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 272 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1428) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1428) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 272]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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" = 1429 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1429], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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" = 'nvc6_SfxSt2SAi9eNCqLlQWesFGZq-VEpBATw5s4JW7Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1430], ["target_type", "User"], ["token", "nvc6_SfxSt2SAi9eNCqLlQWesFGZq-VEpBATw5s4JW7Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nvc6_SfxSt2SAi9eNCqLlQWesFGZq-VEpBATw5s4JW7Q' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'skyh89HpY9szK6E_8Ai8gQgjutRIdioan5y77voCgGXw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1431], ["target_type", "User"], ["token", "skyh89HpY9szK6E_8Ai8gQgjutRIdioan5y77voCgGXw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 372 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'skyh89HpY9szK6E_8Ai8gQgjutRIdioan5y77voCgGXw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'D_FPW6CJuaXxCK6bgSBZagOzNk_ko37Gou6SnhLTAhOQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1432], ["target_type", "User"], ["token", "D_FPW6CJuaXxCK6bgSBZagOzNk_ko37Gou6SnhLTAhOQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 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) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 373 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jmx50XbyV_TzMrSy4bt1ogo69KLwAc4XB9Oh3cjLc2zg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00], ["target_id", 1433], ["target_type", "User"], ["token", "jmx50XbyV_TzMrSy4bt1ogo69KLwAc4XB9Oh3cjLc2zg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:10:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 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" = 1435 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1435], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1435 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1435 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 6.0ms | ActiveRecord: 1.3ms)  (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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1436 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1436], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1436 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1436], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1436 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1436], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 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" = 1436 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 25ms (Views: 23.2ms | ActiveRecord: 0.6ms)  (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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1437 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1437], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1437 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1437], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1437 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1437], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1506"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1437 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1506') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1437]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1437 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1506 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 1.2ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1506 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1438 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1438], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1438 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1438], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 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" = 1438 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1438], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1509"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1438 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1509') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1438]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1438 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1509 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.8ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1509"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1438 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1509') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.2ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1439 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1439], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1439 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1439], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1439 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1439], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1439 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.7ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1439 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 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" = 1440 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1440], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1515"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1440 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1515')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1440 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1515')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1515]]  (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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1441 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1441], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1516"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1441 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1516')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1441 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1516')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1442 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1442], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1442 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1442) 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["target_id", 1442], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1443 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1443], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1443 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1443 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1444 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1444], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1444) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["target_id", 1444], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1445 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1445], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1445) 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["target_id", 1445], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1445 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", 275]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1446 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", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1446], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.1ms) 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" = 1446 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hvLtdn41FPvxleuT3GJCrgSe6cXe-kRARpQe6VkPWd0w' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["target_id", 1446], ["target_type", "User"], ["token", "hvLtdn41FPvxleuT3GJCrgSe6cXe-kRARpQe6VkPWd0w"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"hvLtdn41FPvxleuT3GJCrgSe6cXe-kRARpQe6VkPWd0w"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hvLtdn41FPvxleuT3GJCrgSe6cXe-kRARpQe6VkPWd0w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hvLtdn41FPvxleuT3GJCrgSe6cXe-kRARpQe6VkPWd0w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1446]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1446) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00], ["target_id", 1446], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 375 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:11:51 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1447 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1447], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1447 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1448 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1448], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1448 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1449 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1449], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1450 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1450], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1451], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 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" = 1451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1526 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1452 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1452], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1452 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1527 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1453 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1453], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1453 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1528 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1454 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1454], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1454 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1529 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1455], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 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" = 1455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1456 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1456], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1456 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1456 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1531 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1456 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1531) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1531]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1456]] NewPostNotification Load (0.3ms) 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" = 1456 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1457], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1457], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1457 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1533 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1457 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1533)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 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" = 1458 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1458], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1458 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1458 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1534 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1534]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1458]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1458 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1458 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7zuiWHjAIuuGPNYbqX51LwVuQYWAi7_dmkGCssSq9Qtw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1458], ["target_type", "User"], ["token", "7zuiWHjAIuuGPNYbqX51LwVuQYWAi7_dmkGCssSq9Qtw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.1ms) Date: Thu, 12 Mar 2015 10:11:52 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cbb8264f0_15753ff46d465be45689c@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1459 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1459], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1459 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1535 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1460 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1460], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1460) 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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1460], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1536]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1460]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1460 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1461 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1461], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1537]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1461]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1461 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1462 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1462], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1462 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" = 1462 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1538 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1538]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1462]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1462 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1462 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'csVeeKC1GaDzx-PHJMLM5wNodAmOeDd77jOM5LWmDMhA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1462], ["target_type", "User"], ["token", "csVeeKC1GaDzx-PHJMLM5wNodAmOeDd77jOM5LWmDMhA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.0ms) Date: Thu, 12 Mar 2015 10:11:52 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cbb835f6c_15753ff46d465be456978@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1463 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1463], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1539]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1463]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1463 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1464 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1464], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1540]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1464]] NewPostNotification Load (0.3ms) 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" = 1464 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1464]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1464 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1540 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1465 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1465], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1465 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1465], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1542]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1465]] NewPostNotification Load (0.3ms) 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" = 1465 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1465]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1465 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1541 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1465]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1465 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1542 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1466 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1466], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1466 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Xyg5et1PMtuk-DvmWL6a8AFenPtJz3DZDR3NA5nOFmcw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1466], ["target_type", "User"], ["token", "Xyg5et1PMtuk-DvmWL6a8AFenPtJz3DZDR3NA5nOFmcw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1467 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1467], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1467 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WTEFBKJgIvhLR6tNUU3FSg9_IN23feljnoO4CKqm_wKQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1467], ["target_type", "User"], ["token", "WTEFBKJgIvhLR6tNUU3FSg9_IN23feljnoO4CKqm_wKQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1467 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1468 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["state", "pending"], ["target_id", 1468], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1468 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'usGsem4ShiVXXeFKtnTOVw83PuyAFWqOU7wCW3R6EEsg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1468], ["target_type", "User"], ["token", "usGsem4ShiVXXeFKtnTOVw83PuyAFWqOU7wCW3R6EEsg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 380 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1468 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iB-hRyMI9lku9cyMIcrz7AoaXhDAEexyxnhnaHqhfwzg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1468], ["target_type", "User"], ["token", "iB-hRyMI9lku9cyMIcrz7AoaXhDAEexyxnhnaHqhfwzg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1469) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1469], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 278 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1469) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1469 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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1470) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1470], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 279 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1470) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1470 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.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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1471) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1471], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 280 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1471) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1471) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 280]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 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" = 1472 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", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1472], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-vpaQCKBBMvk7bsVMW3n1wYSHtuRwZ8MuoK6orYoCqNA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1473], ["target_type", "User"], ["token", "-vpaQCKBBMvk7bsVMW3n1wYSHtuRwZ8MuoK6orYoCqNA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-vpaQCKBBMvk7bsVMW3n1wYSHtuRwZ8MuoK6orYoCqNA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pZnWkQWHY3Z2toTVqPlLZgD_LvSK3JodhKdF3N0JAVAg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1474], ["target_type", "User"], ["token", "pZnWkQWHY3Z2toTVqPlLZgD_LvSK3JodhKdF3N0JAVAg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 383 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pZnWkQWHY3Z2toTVqPlLZgD_LvSK3JodhKdF3N0JAVAg' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QMNEmZ7XsNLE-IHTGv_70AtEECJyTSaTF0qbOdCl_DQg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1475], ["target_type", "User"], ["token", "QMNEmZ7XsNLE-IHTGv_70AtEECJyTSaTF0qbOdCl_DQg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 384 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qQ9jnXtfqra7jpmJo-7DQQD2PBInVReKbnHSbYpbh_Ag' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00], ["target_id", 1476], ["target_type", "User"], ["token", "qQ9jnXtfqra7jpmJo-7DQQD2PBInVReKbnHSbYpbh_Ag"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:11:52 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1478 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1478], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1478 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1478 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.9ms | ActiveRecord: 1.2ms)  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1479 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1479], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1479 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1479], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1479 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1479], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1479 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 23ms (Views: 22.0ms | ActiveRecord: 0.5ms)  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1480 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1480], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1480 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1480], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1480 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1480], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1551"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1480 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1551') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1480]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1480 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1551 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.5ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1551 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1481 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1481], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1481 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1481], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1481 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1481], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1554"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1481 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1554') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1481]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1481 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1554 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.8ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1554"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1481 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1554') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.2ms)  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1482 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1482], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1482 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1482], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1482 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1482], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1482 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1482 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1483 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1483], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1560"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1483 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1560')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1483 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1560')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1560]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1484 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1484], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1561"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1484 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1561')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1484 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1561')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1485 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1485], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1485 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1485) 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1485], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1486 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1486], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1486 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1487 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1487], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1487) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1487], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1487 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 4ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1488 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1488], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1488) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1488], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1488 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 283]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1489 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1489], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) 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" = 1489 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kx1SOsL5XAM5LZlgEZFaLQfRJdXsg7vlR7Hk5pMajUVA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1489], ["target_type", "User"], ["token", "kx1SOsL5XAM5LZlgEZFaLQfRJdXsg7vlR7Hk5pMajUVA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"kx1SOsL5XAM5LZlgEZFaLQfRJdXsg7vlR7Hk5pMajUVA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kx1SOsL5XAM5LZlgEZFaLQfRJdXsg7vlR7Hk5pMajUVA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kx1SOsL5XAM5LZlgEZFaLQfRJdXsg7vlR7Hk5pMajUVA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1489]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1489) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1489], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 386 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1490 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1490], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1490 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1491 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1491], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1491 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1492 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1492], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1493 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1493], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1494 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1494], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1494 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1571 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1495 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1495], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1495 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1572 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1496 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1496], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1496 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1573 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1497 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1497], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1497 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1574 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1498 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1498], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1498 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1499], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1576 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1499 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1576) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1576]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1499]] NewPostNotification Load (0.3ms) 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" = 1499 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1500 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1500], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1500 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1500], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1500 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1500 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1578 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1500 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1578)  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 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" = 1501 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1501], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1501 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1501 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1579 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1579]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1501]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1501 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1501 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Z9QzCZZurrAECu89sGrrEgSlKbzlwl2IfyfKQIPtrcew' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1501], ["target_type", "User"], ["token", "Z9QzCZZurrAECu89sGrrEgSlKbzlwl2IfyfKQIPtrcew"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.7ms) Date: Thu, 12 Mar 2015 10:12:20 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cbd4a1e7d_178c3feeddc65be017615@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1502 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1502], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1502 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1580 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1503 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1503], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1503) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1503], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1581]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1503]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1503 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1504 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1504], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1582]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1504]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1504 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1505 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1505], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1505 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1505 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1583 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1583]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1505]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1505 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" = 1505 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KkamHdlm0wI_VSviETGh4AJ2h0R8ZZn94p2kwYWpIC-Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1505], ["target_type", "User"], ["token", "KkamHdlm0wI_VSviETGh4AJ2h0R8ZZn94p2kwYWpIC-Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.2ms) Date: Thu, 12 Mar 2015 10:12:20 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cbd4b203b_178c3feeddc65be0177bb@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1506 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1506], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1584]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1506]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1506 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1507 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1507], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1585]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1507]] NewPostNotification Load (0.3ms) 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" = 1507 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1507]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1507 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1585 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1508 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1508], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1508 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1508], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1587]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1508]] NewPostNotification Load (0.3ms) 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" = 1508 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1508]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1508 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1586 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1508]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1508 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1587 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 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" = 1509 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1509], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1509 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1zLoSMItj9h7wF9bcoXiFAkSVIfdaEprE2IOHPsUVoAA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1509], ["target_type", "User"], ["token", "1zLoSMItj9h7wF9bcoXiFAkSVIfdaEprE2IOHPsUVoAA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1510 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1510], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1510 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'C8K9BB62tQhauN6_7EWb2gM1nNZcqdUYuCtEB1gxwA8Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1510], ["target_type", "User"], ["token", "C8K9BB62tQhauN6_7EWb2gM1nNZcqdUYuCtEB1gxwA8Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1510 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1511 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["state", "pending"], ["target_id", 1511], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1511 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DN_rZ51Skk_Qoox53kaAygJyTuSF3vjdDGNm3UMhcLGQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1511], ["target_type", "User"], ["token", "DN_rZ51Skk_Qoox53kaAygJyTuSF3vjdDGNm3UMhcLGQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (6.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 391 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1511 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zNWLJg0cCCRl9Gim_EFqFwsUWT4u9r_ZgmK_pdyXQUsQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1511], ["target_type", "User"], ["token", "zNWLJg0cCCRl9Gim_EFqFwsUWT4u9r_ZgmK_pdyXQUsQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1512) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1512], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 286 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1512) LIMIT 1  (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" = 1512 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.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1513) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1513], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 287 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1513) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1513 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1514) 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1514], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 288 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1514) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1514) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 288]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1515 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1515], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 's7sYftj8GKHCDNSeq73VCgWpIR90Oct0FdGyqgUIGktQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1516], ["target_type", "User"], ["token", "s7sYftj8GKHCDNSeq73VCgWpIR90Oct0FdGyqgUIGktQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 's7sYftj8GKHCDNSeq73VCgWpIR90Oct0FdGyqgUIGktQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) 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" = 'WnhnyVxorvpRwsTcYHFWtAb1rQZGdw2CqdR3TCsxDEvQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1517], ["target_type", "User"], ["token", "WnhnyVxorvpRwsTcYHFWtAb1rQZGdw2CqdR3TCsxDEvQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 394 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WnhnyVxorvpRwsTcYHFWtAb1rQZGdw2CqdR3TCsxDEvQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yNTy7AzDBfjZ9rf-ZYPxVwiS2Lf1ig4Cr9mjBpTGABlg' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1518], ["target_type", "User"], ["token", "yNTy7AzDBfjZ9rf-ZYPxVwiS2Lf1ig4Cr9mjBpTGABlg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 395 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) 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" = 'fumg0-H5xXxFJAf1I3VORwMOC2kItxgUGRpUAZoa9FnA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00], ["target_id", 1519], ["target_type", "User"], ["token", "fumg0-H5xXxFJAf1I3VORwMOC2kItxgUGRpUAZoa9FnA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:12:20 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (3.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) 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" = 1521 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1521], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1521 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1521 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.5ms | ActiveRecord: 1.1ms)  (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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1522 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1522], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1522 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1522], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1522 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1522], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1522 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 21ms (Views: 20.1ms | ActiveRecord: 0.4ms)  (0.4ms) 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1523 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1523], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1523 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1523], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1523 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1523], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1596"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1523 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1596') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1523]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1523 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1596 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1596 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1524 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1524], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1524 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1524], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1524 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1524], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1599"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1524 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1599') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1524]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1524 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1599 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.7ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1599"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1524 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1599') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1525 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1525 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1525 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1525 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1525 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1526 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", Wed, 11 Mar 2015 23:14:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1526], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:39 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1605"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1526 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1605')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1526 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1605')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1605]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1527 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1606"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1527 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1606')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1527 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1606')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1528 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1528 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1528) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1528 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1529 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1529], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1529 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1529 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1529 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1529 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1530 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1530], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1530) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1530], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1530 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1531 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1531], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1531) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1531], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 291]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1532 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1532], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 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" = 1532 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EiH3KAEddKHejOxkIlpOWQQJ_SYfaFu1bE--rku-eS4Q' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1532], ["target_type", "User"], ["token", "EiH3KAEddKHejOxkIlpOWQQJ_SYfaFu1bE--rku-eS4Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"EiH3KAEddKHejOxkIlpOWQQJ_SYfaFu1bE--rku-eS4Q"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EiH3KAEddKHejOxkIlpOWQQJ_SYfaFu1bE--rku-eS4Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EiH3KAEddKHejOxkIlpOWQQJ_SYfaFu1bE--rku-eS4Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1532]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1532) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1532], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 397 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1533 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1533], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1533 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (0.1ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1534 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1534], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1534 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1536 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1536], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1537 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1537], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1537 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1616 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1538 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1538], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1538 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1617 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1539 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1539], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1539 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1618 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) 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.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1540 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1540], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 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" = 1540 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1619 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1541], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1542], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1621 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1542 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1621) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1621]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1542]] 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" = 1542 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1543], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1543], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1543 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" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1623 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1543 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1623)  (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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1544], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1624 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.4ms) 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", 1624]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1544]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1544 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JYkYRrh8AEaSDgMtxiwc-AQAdcJRZBJR9YsQRJT3Y-aQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1544], ["target_type", "User"], ["token", "JYkYRrh8AEaSDgMtxiwc-AQAdcJRZBJR9YsQRJT3Y-aQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.4ms) Date: Thu, 12 Mar 2015 10:14:40 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cc60551d5_1a853fe9e8c65be4939a4@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1545 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1545], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1545 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1625 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1546 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1546], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1546) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1546], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1626]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1546]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1546 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.4ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1547 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1547], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1627]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1547]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1547 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1548 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1548], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1548 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1548 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1628 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1628]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1548]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1548 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1548 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vY7bNQNpc499NCgzbjqVgA893SN9DUnOHEb4zI-oLFGA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1548], ["target_type", "User"], ["token", "vY7bNQNpc499NCgzbjqVgA893SN9DUnOHEb4zI-oLFGA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.1ms) Date: Thu, 12 Mar 2015 10:14:40 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cc6064e9c_1a853fe9e8c65be494079@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1549], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1629]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1549]]  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1550 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1550], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1630]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1550]] NewPostNotification Load (0.3ms) 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" = 1550 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1550]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1550 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1630 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1632]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1551]] NewPostNotification Load (0.3ms) 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" = 1551 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1551]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1631 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1551]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1632 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1552 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1552], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1552 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QEFHc-roDehzhLXXvMHSbgTHGM3ikTphn476pMGWsaDg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1552], ["target_type", "User"], ["token", "QEFHc-roDehzhLXXvMHSbgTHGM3ikTphn476pMGWsaDg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1553 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1553], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1553 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4G9r9VppNRHIDzYidgkaGgBFPDToDxce3IVnILivOxSA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1553], ["target_type", "User"], ["token", "4G9r9VppNRHIDzYidgkaGgBFPDToDxce3IVnILivOxSA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1553 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1554 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["state", "pending"], ["target_id", 1554], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1554 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dslkl3HrTWjxRm58a6tPeAQiSX6h1BHldcWmaEeadELw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1554], ["target_type", "User"], ["token", "dslkl3HrTWjxRm58a6tPeAQiSX6h1BHldcWmaEeadELw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 402 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1554 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UbwAKqTONoVSqj3YeLVtIgL55MIS6gwqNNsXjmc5NX6A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1554], ["target_type", "User"], ["token", "UbwAKqTONoVSqj3YeLVtIgL55MIS6gwqNNsXjmc5NX6A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1555) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1555], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 294 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1555) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1555 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.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1556) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1556], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 295 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1556) LIMIT 1  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1556 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1557) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 296 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1557) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1557) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1557 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1557 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 296]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1557 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1558 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 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" = 'p9J8DKhnkK4FR8wfsswCTA4MkDukna1sTNnx0gSncKeQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1559], ["target_type", "User"], ["token", "p9J8DKhnkK4FR8wfsswCTA4MkDukna1sTNnx0gSncKeQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'p9J8DKhnkK4FR8wfsswCTA4MkDukna1sTNnx0gSncKeQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5NE4Yb3-0FExyNfzO3DqpgfGjBgwhkpA3BZQGYIMmQFQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1560], ["target_type", "User"], ["token", "5NE4Yb3-0FExyNfzO3DqpgfGjBgwhkpA3BZQGYIMmQFQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 405 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5NE4Yb3-0FExyNfzO3DqpgfGjBgwhkpA3BZQGYIMmQFQ' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GI8rko6vBOnUD52iJbODog7vdAuHXtPzJ6lVCv7wDx6A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1561], ["target_type", "User"], ["token", "GI8rko6vBOnUD52iJbODog7vdAuHXtPzJ6lVCv7wDx6A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 406 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) 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" = 'eKnOyVwwRwklqpG4FlWqxw-kp3vfaKqor9aR_VjMzybQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00], ["target_id", 1562], ["target_type", "User"], ["token", "eKnOyVwwRwklqpG4FlWqxw-kp3vfaKqor9aR_VjMzybQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:40 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) 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" = 1564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1564], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1564 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1564 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 6.1ms | ActiveRecord: 1.0ms)  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1565 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1565], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1565 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1565], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1565 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1565], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1565 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 24ms (Views: 22.5ms | ActiveRecord: 0.4ms)  (0.4ms) 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1566 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1566], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1566 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1566], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 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" = 1566 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1566], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.6ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1641"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1566 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1641') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1566]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1566 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1641 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.2ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1641 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1567 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1567], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1567 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1567], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1567 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1567], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1644"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1567 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1644') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1567]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1567 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1644 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1644"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1567 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1644') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1568 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1568], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1568 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1568], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1568 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1568], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1568 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1568 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1569 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1569], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1650"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1569 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1650')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1569 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1650')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.6ms) 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", 1650]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1570 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1570], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1651"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1570 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1651')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1570 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1651')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1571 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1571 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1571 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1571) 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1571 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1571 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1572 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1572], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1572 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1572 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1572 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1572 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1573 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1573) 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1573 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1574 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1574], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1574) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1574], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1574 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 299]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1575 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1575], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 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" = 1575 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4J2yXrG-v_tck4_BQ0poxQXsvZw-ESzYf7FVBW1lJPAg' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1575], ["target_type", "User"], ["token", "4J2yXrG-v_tck4_BQ0poxQXsvZw-ESzYf7FVBW1lJPAg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"4J2yXrG-v_tck4_BQ0poxQXsvZw-ESzYf7FVBW1lJPAg"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4J2yXrG-v_tck4_BQ0poxQXsvZw-ESzYf7FVBW1lJPAg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4J2yXrG-v_tck4_BQ0poxQXsvZw-ESzYf7FVBW1lJPAg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1575]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1575) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1575], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 408 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1576], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1576 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1577], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1577 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1578 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1578], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1579 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1579], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1580 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1580], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1580 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1661 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1581 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1581], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1581 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1662 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1582 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1582], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1582 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1663 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:55 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1583 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1583], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 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" = 1583 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1664 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1584 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1584], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1584 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1585 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1585], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1585 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1585 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1666 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1585 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1666) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1666]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1585]] NewPostNotification Load (0.3ms) 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" = 1585 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1586 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1586], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1586 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1586], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1586 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" = 1586 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1668 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1586 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1668)  (0.1ms) 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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) 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" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1587], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1669 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1669]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1587]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1587 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uH5iEFqCnell0HPZuvIhwge9T0PLI4ZFM_Koj4TN1B6Q' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1587], ["target_type", "User"], ["token", "uH5iEFqCnell0HPZuvIhwge9T0PLI4ZFM_Koj4TN1B6Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.6ms) Date: Thu, 12 Mar 2015 10:14:55 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cc6fe2c32_1c863fd439865be489560@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1588 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1588], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1588 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1670 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1589], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1589) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1589], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1671]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1589]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1672]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1590]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 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" = 1591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["state", "pending"], ["target_id", 1591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1673 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1673]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1591]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1591 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Ot7BM2JoeYTsJqPlY2xmqgFGVfyaNosTX9D8cvJcnhdw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["target_id", 1591], ["target_type", "User"], ["token", "Ot7BM2JoeYTsJqPlY2xmqgFGVfyaNosTX9D8cvJcnhdw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.9ms) Date: Thu, 12 Mar 2015 10:14:55 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cc6ff1ca9_1c863fd439865be489623@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:14:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:55 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1674]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1592]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1675]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1593]] NewPostNotification Load (0.3ms) 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" = 1593 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1593]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1675 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1677]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1594]] 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" = 1594 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1594]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1676 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1594]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1677 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1595], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1595 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oHRI93SMssy5wq3410QxggbjsNLp_9s9N0K7VQb0uCRA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1595], ["target_type", "User"], ["token", "oHRI93SMssy5wq3410QxggbjsNLp_9s9N0K7VQb0uCRA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1596], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1596 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'okOny5KudzZCm6lvma0FvgCBpCwiAXYhtTwPG4ApdMjQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1596], ["target_type", "User"], ["token", "okOny5KudzZCm6lvma0FvgCBpCwiAXYhtTwPG4ApdMjQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1596 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["state", "pending"], ["target_id", 1597], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1597 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OX__ZNJkAZYI69QnLIu0nQHOYepE_V1uNLswc6dbq-DA' LIMIT 1 SQL (6.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1597], ["target_type", "User"], ["token", "OX__ZNJkAZYI69QnLIu0nQHOYepE_V1uNLswc6dbq-DA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 413 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1597 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'S1IaCbxHWKjq07abXwgUoQf2k5Ivr7GfEMsdwSAteuxQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1597], ["target_type", "User"], ["token", "S1IaCbxHWKjq07abXwgUoQf2k5Ivr7GfEMsdwSAteuxQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1598) 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", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1598], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 302 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1598) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1598 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1599) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1599], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 303 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1599) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1599 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1600) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1600], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 304 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1600) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1600) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 304]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1601 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", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 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" = 'JYHusYtIp6M6UnOG8IFl6ggpwyO26dgR08LHTtw9gGvw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1602], ["target_type", "User"], ["token", "JYHusYtIp6M6UnOG8IFl6ggpwyO26dgR08LHTtw9gGvw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JYHusYtIp6M6UnOG8IFl6ggpwyO26dgR08LHTtw9gGvw' 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", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 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" = 'gGpfYcgMu2BUbHZR2-d1BAJFxKT1a_N16p77ID8tmzpg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1603], ["target_type", "User"], ["token", "gGpfYcgMu2BUbHZR2-d1BAJFxKT1a_N16p77ID8tmzpg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 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) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 416 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gGpfYcgMu2BUbHZR2-d1BAJFxKT1a_N16p77ID8tmzpg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 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" = 'LvGRdpgDcitDbpeEiUNE3whnm3clJfYVugfJthH4unDw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1604], ["target_type", "User"], ["token", "LvGRdpgDcitDbpeEiUNE3whnm3clJfYVugfJthH4unDw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 417 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OWNaj9xnjZFuoTpGwUDu1gpM6AHD0uWZ0sAS1AlcaX4A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00], ["target_id", 1605], ["target_type", "User"], ["token", "OWNaj9xnjZFuoTpGwUDu1gpM6AHD0uWZ0sAS1AlcaX4A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:14:56 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1607], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1607 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1607 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 13ms (Views: 6.8ms | ActiveRecord: 1.2ms)  (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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1608 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1608 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1608 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1608 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 23ms (Views: 21.3ms | ActiveRecord: 0.5ms)  (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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 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" = 1609 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1609 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 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" = 1609 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1686"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1609 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1686') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1609]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1686 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.2ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1686 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1610 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 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" = 1610 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1689"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1610 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1689') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1610]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1689 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1689"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1610 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1689') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1611 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 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" = 1611 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1611 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1611 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1611 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1612 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1612], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1695"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1612 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1695')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1612 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1695')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1695]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1613 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1613], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1696"]} SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1613 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1696')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1613 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1696')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.9ms)  (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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1614], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1614 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1614) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["target_id", 1614], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1615 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1615 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1615 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1616 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1616) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["target_id", 1616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.2ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1617 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1617) 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["target_id", 1617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 307]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1618 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) 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" = 1618 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fFdhuwTSS9fTKN5TkWSgNwxQKKtBgXz175hERXvv1y9g' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["target_id", 1618], ["target_type", "User"], ["token", "fFdhuwTSS9fTKN5TkWSgNwxQKKtBgXz175hERXvv1y9g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"fFdhuwTSS9fTKN5TkWSgNwxQKKtBgXz175hERXvv1y9g"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fFdhuwTSS9fTKN5TkWSgNwxQKKtBgXz175hERXvv1y9g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fFdhuwTSS9fTKN5TkWSgNwxQKKtBgXz175hERXvv1y9g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1618]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1618) 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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["target_id", 1618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 419 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.6ms) NotifyUser::UserHash Load (0.3ms) 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 (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["state", "pending"], ["target_id", 1619], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1619 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1620 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["state", "pending"], ["target_id", 1620], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1620 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["state", "pending"], ["target_id", 1621], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["state", "pending"], ["target_id", 1622], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:37 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" = 1623 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00], ["state", "pending"], ["target_id", 1623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1623 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1706 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:15:37 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1624 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1624], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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" = 1624 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1707 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:15:38 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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" = 1625 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1625], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1625 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1708 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:15:38 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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" = 1626 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1626], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1626 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1709 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1627 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1627], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1627 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1628 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1628], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1628 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1628 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1711 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1628 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1711) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1711]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1628]] NewPostNotification Load (0.3ms) 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" = 1628 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1629], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1629], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1713 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1629 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1713)  (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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1630], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1714 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1714]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1630]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1630 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'm55es17acUdc-SYJpL8bIQoprIayL1JuWobPwuu3dUdw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1630], ["target_type", "User"], ["token", "m55es17acUdc-SYJpL8bIQoprIayL1JuWobPwuu3dUdw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.6ms) Date: Thu, 12 Mar 2015 10:15:38 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cc9a191ed_1eaf3fc358465be419048@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1631 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1631], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1631 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1715 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1632 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1632], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1632) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1632], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1716]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1632]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1632 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1717]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1633]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) 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" = 1634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1718 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1718]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1634]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1634 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NNmF4X-d46fQuSaet9VCnQkDSGSbKP1UlqLGLMv7Rstg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1634], ["target_type", "User"], ["token", "NNmF4X-d46fQuSaet9VCnQkDSGSbKP1UlqLGLMv7Rstg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.0ms) Date: Thu, 12 Mar 2015 10:15:38 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cc9a282f7_1eaf3fc358465be419128@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) 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" = 1635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1719]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1635]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) 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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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" = 1636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1720]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1636]] NewPostNotification Load (0.3ms) 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" = 1636 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1636]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1720 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1722]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1637]] 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" = 1637 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.3ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1637]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1721 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1637]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1722 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1638 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1638], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1638 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fDZLI8mt9qTA-Swuo0T6ZQ8CoK1mpFO8CflMP2Qx6SIA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1638], ["target_type", "User"], ["token", "fDZLI8mt9qTA-Swuo0T6ZQ8CoK1mpFO8CflMP2Qx6SIA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1639], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1639 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rALGJQJ5Lr88q0IZZzQzMQs1aGMTdqPOGjlYAs362m9g' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1639], ["target_type", "User"], ["token", "rALGJQJ5Lr88q0IZZzQzMQs1aGMTdqPOGjlYAs362m9g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1639 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["state", "pending"], ["target_id", 1640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1640 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eBEco51hxJLdmf0evd6hKwMCAuHnikac6t2xsUAOQzyQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1640], ["target_type", "User"], ["token", "eBEco51hxJLdmf0evd6hKwMCAuHnikac6t2xsUAOQzyQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 424 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1640 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nIfVChehed6vgCRlfFgVzQAvlJBCbo45l-1skn1EZRcQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1640], ["target_type", "User"], ["token", "nIfVChehed6vgCRlfFgVzQAvlJBCbo45l-1skn1EZRcQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1641) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 310 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1641) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1642) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 311 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1642) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1642 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1643) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 312 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1643) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1643) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 312]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1644 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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cfOGkd5NCCdQ8T1sMluaeQch3RUzSjilaIKrJzA38Xqg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1645], ["target_type", "User"], ["token", "cfOGkd5NCCdQ8T1sMluaeQch3RUzSjilaIKrJzA38Xqg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cfOGkd5NCCdQ8T1sMluaeQch3RUzSjilaIKrJzA38Xqg' 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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HIglGg0RCyYfbVi6YTD18QMniSj9mM8TUepeGYmOkglw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1646], ["target_type", "User"], ["token", "HIglGg0RCyYfbVi6YTD18QMniSj9mM8TUepeGYmOkglw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 427 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HIglGg0RCyYfbVi6YTD18QMniSj9mM8TUepeGYmOkglw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ybViOBPCAlTAkf-olAsNGgPxeZhuwllnqJd0yM6HbZxw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1647], ["target_type", "User"], ["token", "ybViOBPCAlTAkf-olAsNGgPxeZhuwllnqJd0yM6HbZxw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 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) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 428 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'O7_DjHCdRaEHW7kDQO5VTgZuV-vQpF74G1J0KxaXRm0A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00], ["target_id", 1648], ["target_type", "User"], ["token", "O7_DjHCdRaEHW7kDQO5VTgZuV-vQpF74G1J0KxaXRm0A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:15:38 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.0ms)  (0.3ms) 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 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" = 1650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1650], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1650 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1650 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 11ms (Views: 5.9ms | ActiveRecord: 1.0ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1651 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 20ms (Views: 18.9ms | ActiveRecord: 0.4ms)  (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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1731"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1652 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1731') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1652]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1731 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.1ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1731 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1653 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1653 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1734"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1653 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1734') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1653]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1734 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1734"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1653 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1734') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1654 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) 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" = 1654 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1654 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1654 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1655 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1740"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1655 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1740')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1655 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1740')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1740]]  (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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1656 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1741"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1656 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1741')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1656 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1741')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1657 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1657], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1657 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1657) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["target_id", 1657], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1657 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1658 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1658], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1658 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1659 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) 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" = 1659) 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["target_id", 1659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1660 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1660) 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["target_id", 1660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 315]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1661 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", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 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" = 1661 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SdWopF8r7Pdl2PrnwZ7NXAcHr7cTH-kTYW8EZBW25GNg' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["target_id", 1661], ["target_type", "User"], ["token", "SdWopF8r7Pdl2PrnwZ7NXAcHr7cTH-kTYW8EZBW25GNg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"SdWopF8r7Pdl2PrnwZ7NXAcHr7cTH-kTYW8EZBW25GNg"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SdWopF8r7Pdl2PrnwZ7NXAcHr7cTH-kTYW8EZBW25GNg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SdWopF8r7Pdl2PrnwZ7NXAcHr7cTH-kTYW8EZBW25GNg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1661]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1661) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00], ["target_id", 1661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 430 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:10 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 3.0ms) NotifyUser::UserHash Load (0.4ms) 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 (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1662 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1663 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1664], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1665 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1665], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 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" = 1666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1751 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1752 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1668 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1668 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1753 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1669 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1669], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1669 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1754 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1670 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1670], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1670 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1671], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1756 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1671 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1756) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1756]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1671]] NewPostNotification Load (0.3ms) 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" = 1671 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1672 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1672], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1672 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1672], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1672 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1672 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1758 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1672 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1758)  (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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1673], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1759 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) 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", 1759]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1673]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1673 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KvGGKYYAgElGKrbxk9j8twOpG9Oh1GzZaP2VqwKRlofQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1673], ["target_type", "User"], ["token", "KvGGKYYAgElGKrbxk9j8twOpG9Oh1GzZaP2VqwKRlofQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (8.7ms) Date: Thu, 12 Mar 2015 10:16:11 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ccbb29742_20d33fc2f4821bd4199b7@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1674 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1674], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 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" = 1674 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1760 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1675], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1675) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1675], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1761]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1675]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1676 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1676], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1762]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1676]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1676 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1677], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1763 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1763]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1677]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1677 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1677 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'RzCtWKDI7C4v1NeK0FhryQ46hw73_sNVuPy8IuhU72DA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1677], ["target_type", "User"], ["token", "RzCtWKDI7C4v1NeK0FhryQ46hw73_sNVuPy8IuhU72DA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Thu, 12 Mar 2015 10:16:11 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ccbb398dc_20d33fc2f4821bd420020@Antons-MacBook-Pro.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.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1764]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1678]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1765]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1679]] NewPostNotification Load (0.3ms) 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" = 1679 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1679]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1765 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1767]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1680]] 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" = 1680 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1680]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1766 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1680]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1767 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1681 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7XYuE_MGgekiiPbKrMoGEgAQfN25dw18CQm-n9vHxN6g' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1681], ["target_type", "User"], ["token", "7XYuE_MGgekiiPbKrMoGEgAQfN25dw18CQm-n9vHxN6g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1682 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NRuCADQuAW4yE0ENg_fn6QsqCD14Rjwe6nEOnnKekj1Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1682], ["target_type", "User"], ["token", "NRuCADQuAW4yE0ENg_fn6QsqCD14Rjwe6nEOnnKekj1Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1682 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1683 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["state", "pending"], ["target_id", 1683], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1683 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8ABpq-H9k9ukkC-yf3RZ_gNfrbzPUs9hgoMOC0zvbhkQ' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1683], ["target_type", "User"], ["token", "8ABpq-H9k9ukkC-yf3RZ_gNfrbzPUs9hgoMOC0zvbhkQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 435 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1683 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qG7c3hB8l1HObJkL2VBxbg3tgixmdNaE2PBj_YhZD7gA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1683], ["target_type", "User"], ["token", "qG7c3hB8l1HObJkL2VBxbg3tgixmdNaE2PBj_YhZD7gA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1684) 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1684], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 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"."id" != 318 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1684) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1684 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1685) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 319 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1685) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1685 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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1686) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1686], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 320 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1686) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1686) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 320]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) 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" = 'nPGX6PTog7osm656lqnlrQD7MVBYv4nEm14l9m9mGH_g' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1688], ["target_type", "User"], ["token", "nPGX6PTog7osm656lqnlrQD7MVBYv4nEm14l9m9mGH_g"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nPGX6PTog7osm656lqnlrQD7MVBYv4nEm14l9m9mGH_g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) 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" = 'ZP3CmhArrf9iS2u2MhfB9wOHEcGyBzpINBLCECaDCYaA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1689], ["target_type", "User"], ["token", "ZP3CmhArrf9iS2u2MhfB9wOHEcGyBzpINBLCECaDCYaA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 438 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZP3CmhArrf9iS2u2MhfB9wOHEcGyBzpINBLCECaDCYaA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3RliFOl8sFAnRQYDVHp2LALLhQdBjJPURq7CR7Pv8sAg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1690], ["target_type", "User"], ["token", "3RliFOl8sFAnRQYDVHp2LALLhQdBjJPURq7CR7Pv8sAg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 439 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:11 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", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qC0dGAMUlsfFviFnPK82cQnuXdr0iJUruPBVJKDr9UUA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00], ["target_id", 1691], ["target_type", "User"], ["token", "qC0dGAMUlsfFviFnPK82cQnuXdr0iJUruPBVJKDr9UUA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:11 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:16:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:24 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" = 1693 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1693], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1693 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1693 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 10ms (Views: 5.7ms | ActiveRecord: 1.1ms)  (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", Wed, 11 Mar 2015 23:16:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:24 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1694 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1694 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1694 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1694 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 20ms (Views: 18.9ms | ActiveRecord: 0.4ms)  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1776"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1695 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1776') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1695]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1776 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 1.2ms | ActiveRecord: 2.2ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1776 ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1696 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1779"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1696 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1779') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1696]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1779 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1779"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1696 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1779') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1697 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1697 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1697 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1697 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1697 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1698 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1785"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1698 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1785')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1698 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1785')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1785]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1699 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1699], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1786"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1699 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1786')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1699 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1786')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1700 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1700 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1700) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1701 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1701 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.5ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1701 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1702 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1702], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.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" = 1702) 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1702], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1703 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1703) 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 323]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1704 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1704], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) 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" = 1704 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iaXECbPNSMoTWWQiv-yudAzpUOH_DNnFNpJj-iinc0Zw' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1704], ["target_type", "User"], ["token", "iaXECbPNSMoTWWQiv-yudAzpUOH_DNnFNpJj-iinc0Zw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"iaXECbPNSMoTWWQiv-yudAzpUOH_DNnFNpJj-iinc0Zw"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iaXECbPNSMoTWWQiv-yudAzpUOH_DNnFNpJj-iinc0Zw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iaXECbPNSMoTWWQiv-yudAzpUOH_DNnFNpJj-iinc0Zw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1704]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1704) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1704], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 441 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 2.7ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1705 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1706], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1706 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 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" = 1707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1707], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1708], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1709], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1796 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:25 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') ORDER BY "notify_user_notifications"."id" DESC 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1710], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1797 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1711 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1711], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1711 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1798 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1712 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1712], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1712 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1799 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1713 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1713], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1713 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1714 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1714], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1714 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1714 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1801 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1714 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1801) 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", 1801]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1714]] NewPostNotification Load (0.3ms) 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" = 1714 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1715], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1715], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1803 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1715 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1803)  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 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" = 1716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1716], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1804 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1804]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1716]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1716 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SkpDdoZgAzfwubNKJ-OSbgV6OlNvvYUVu9emzUfNdS1Q' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1716], ["target_type", "User"], ["token", "SkpDdoZgAzfwubNKJ-OSbgV6OlNvvYUVu9emzUfNdS1Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.7ms) Date: Thu, 12 Mar 2015 10:16:25 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ccc96ce9a_22d63fea01465bec3218@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1805 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1718], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1718) 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1718], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1806]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1718]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1719], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1807]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1719]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 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" = 1720 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1720], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1720 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1720 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1808 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1808]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1720]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1720 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1720 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2dep-FQbOY5zyMgdro-3tAFHjsOEmpHDNq0VYl1DRI7A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1720], ["target_type", "User"], ["token", "2dep-FQbOY5zyMgdro-3tAFHjsOEmpHDNq0VYl1DRI7A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (4.9ms) Date: Thu, 12 Mar 2015 10:16:25 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ccc97bbbd_22d63fea01465bec337@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1721 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1721], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1809]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1721]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1721 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) 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" = 1722 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1722], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1810]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1722]] NewPostNotification Load (0.3ms) 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" = 1722 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1722]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1722 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1810 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1723], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1723], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1812]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1723]] 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" = 1723 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1723]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1811 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1723]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1812 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1724], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1724 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q1wBm7cKRkwD9hH_kQC0rQdCcLztZy2dPESV5gfsqQog' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1724], ["target_type", "User"], ["token", "q1wBm7cKRkwD9hH_kQC0rQdCcLztZy2dPESV5gfsqQog"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1725 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TMrrpUxVPJT-AS6LsceYlgJgdCw7S399dYzTDhCvxqUA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1725], ["target_type", "User"], ["token", "TMrrpUxVPJT-AS6LsceYlgJgdCw7S399dYzTDhCvxqUA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1725 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1726 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["state", "pending"], ["target_id", 1726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1726 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eaoaTV71jfq4qgINKih3YgmWDUs0HMV9ukv6cJRMPTEw' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1726], ["target_type", "User"], ["token", "eaoaTV71jfq4qgINKih3YgmWDUs0HMV9ukv6cJRMPTEw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 446 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1726 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7zp_plWkT-sFatjILU8-vgLFYVbveJbHB4wPBh8pe97w' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1726], ["target_type", "User"], ["token", "7zp_plWkT-sFatjILU8-vgLFYVbveJbHB4wPBh8pe97w"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1727) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1727], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 326 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1727) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1727 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1728) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1728], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 327 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1728) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1728 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.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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1729) 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1729], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 328 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1729) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1729) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1729 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1729 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 328]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1729 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1730 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1730], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XS-LnaMTozHDP8Q3iHvB0QrEuzZHk3A31unA2sb5e-9A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1731], ["target_type", "User"], ["token", "XS-LnaMTozHDP8Q3iHvB0QrEuzZHk3A31unA2sb5e-9A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XS-LnaMTozHDP8Q3iHvB0QrEuzZHk3A31unA2sb5e-9A' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) 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" = 'eux3Dih_kuglQh9QInQD6gThRxCJVI3iMr_1XU75C4AA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1732], ["target_type", "User"], ["token", "eux3Dih_kuglQh9QInQD6gThRxCJVI3iMr_1XU75C4AA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 449 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eux3Dih_kuglQh9QInQD6gThRxCJVI3iMr_1XU75C4AA' 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", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 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" = 'yt1Mkd0-LS5nyzG9JQjRjgajKCHAUHA0nBfyfQ6DiTdw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1733], ["target_type", "User"], ["token", "yt1Mkd0-LS5nyzG9JQjRjgajKCHAUHA0nBfyfQ6DiTdw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 450 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZgXpAv9BYO30HLd9IOnskQtMefYcrMoegpyIKRzJLGZQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00], ["target_id", 1734], ["target_type", "User"], ["token", "ZgXpAv9BYO30HLd9IOnskQtMefYcrMoegpyIKRzJLGZQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:25 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1736 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1736], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1736 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1736 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 14ms (Views: 7.9ms | ActiveRecord: 1.6ms)  (0.7ms) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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" = 1737 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1737], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1737 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1737], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1737 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1737], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1737 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 25ms (Views: 23.2ms | ActiveRecord: 0.4ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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" = 1738 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1738], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 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" = 1738 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1738], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1738 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1738], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1821"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1738 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1821') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1738]]  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1738 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1821 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 1.1ms | ActiveRecord: 3.2ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1821 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.6ms) ROLLBACK  (0.1ms) BEGIN  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (1.1ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1739 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1739], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1739 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1739], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1739 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1739], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1824"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1739 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1824') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1739]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1739 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1824 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.2ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1824"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1739 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1824') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.6ms)  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1740 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1740], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 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" = 1740 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1740], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1740 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1740], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1740 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1740 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1741 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1741], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1830"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1741 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1830')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1741 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1830')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.8ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1830]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1742 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1742], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1831"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1742 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1831')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1742 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1831')) Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.7ms)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1743 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1743], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1743 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.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1743) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1743], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 15ms (Views: 0.3ms | ActiveRecord: 2.0ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1743 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.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1744 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1744], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1744 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1745 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1745], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1745) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1745], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 6ms (ActiveRecord: 1.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1746], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 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" = 1746) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1746], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 331]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1747 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1747], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 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" = 1747 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YkjI-6afS1MYX8SD6y0BRgozLouFU_yKo0ulsAdTtAlA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1747], ["target_type", "User"], ["token", "YkjI-6afS1MYX8SD6y0BRgozLouFU_yKo0ulsAdTtAlA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"YkjI-6afS1MYX8SD6y0BRgozLouFU_yKo0ulsAdTtAlA"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YkjI-6afS1MYX8SD6y0BRgozLouFU_yKo0ulsAdTtAlA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YkjI-6afS1MYX8SD6y0BRgozLouFU_yKo0ulsAdTtAlA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1747]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1747) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1747], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 452 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 3.0ms) NotifyUser::UserHash Load (0.3ms) 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 (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1748 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1748], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1748 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) Notification target, User, does not respond to the method, devices.  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1749 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1749], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1749 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1750], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1751 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1751], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1752], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1841 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1753 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1753], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1753 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1842 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:46 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1754], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 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" = 1754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1843 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1755 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1755], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1755 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1844 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1756 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1756], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1756 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1757 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1757], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1757 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1757 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1846 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1757 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1846) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1846]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1757]] 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" = 1757 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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" = 1758 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1758], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1758 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1758], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1758 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1758 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1848 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1758 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1848)  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1759 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1759], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1759 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1759 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1849 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1849]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1759]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1759 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1759 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ZwLGQAiBvMwWrGzaMAy-tguqiKRqVUgaK9UUaqXBPM0A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1759], ["target_type", "User"], ["token", "ZwLGQAiBvMwWrGzaMAy-tguqiKRqVUgaK9UUaqXBPM0A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.5ms) Date: Thu, 12 Mar 2015 10:16:46 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ccdeb234a_24e73fdca4465be879691@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1760 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1760], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1760 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1850 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1761 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1761], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1761) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1761], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1851]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1761]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1761 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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" = 1762 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1762], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1852]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1762]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1762 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1763 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1763], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1763 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1763 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1853 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1853]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1763]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1763 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1763 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DarCHMV1lX9kI4-dGOVTHAlvVQ918nq4aWYaetYlvs5A' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1763], ["target_type", "User"], ["token", "DarCHMV1lX9kI4-dGOVTHAlvVQ918nq4aWYaetYlvs5A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (6.4ms) Date: Thu, 12 Mar 2015 10:16:46 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ccdec2312_24e73fdca4465be879761@Antons-MacBook-Pro.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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1764 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1764], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1854]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1764]]  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1764 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1765 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1765], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1855]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1765]] NewPostNotification Load (0.3ms) 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" = 1765 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1765]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1765 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1855 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 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" = 1766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1766], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1766], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1857]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1766]] 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" = 1766 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1766]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1856 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1766]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1766 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1857 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1767 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1767], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1767 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9eQAkMT88SyE7VI5fXuyGArSP6lXbq0CQECXO_Doenzg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1767], ["target_type", "User"], ["token", "9eQAkMT88SyE7VI5fXuyGArSP6lXbq0CQECXO_Doenzg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1768], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1768 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'S2yJxtOfWfO-VKZ-BrMuvgj3yjR7Q-T-ugHbK7MiKqTg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1768], ["target_type", "User"], ["token", "S2yJxtOfWfO-VKZ-BrMuvgj3yjR7Q-T-ugHbK7MiKqTg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1768 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1769 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["state", "pending"], ["target_id", 1769], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1769 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'x3nH9xoy1CrIo_T0BYwLYAyTXNSoR1TmMpBaeVwucM8A' LIMIT 1 SQL (1.2ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1769], ["target_type", "User"], ["token", "x3nH9xoy1CrIo_T0BYwLYAyTXNSoR1TmMpBaeVwucM8A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 457 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1769 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'U2VILgqz7vqmKHiJtCRJJgcmfSf81017GsYuUAsVMgEA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1769], ["target_type", "User"], ["token", "U2VILgqz7vqmKHiJtCRJJgcmfSf81017GsYuUAsVMgEA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1770) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1770], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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"."id" != 334 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1770) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1770 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1771) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1771], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 335 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1771) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1771 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.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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1772) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1772], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 336 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1772) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1772) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 336]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1773 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1773], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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" = 'mKyUHuirdkle3Up3fut2ewA2euv5yxF8mL6eRqrl8avw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1774], ["target_type", "User"], ["token", "mKyUHuirdkle3Up3fut2ewA2euv5yxF8mL6eRqrl8avw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mKyUHuirdkle3Up3fut2ewA2euv5yxF8mL6eRqrl8avw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.7ms) 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", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) 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" = 'UM-XgDXaJ8ew9HVaAZ04WgirLcwHtF8rhp6J4jQozZ6A' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1775], ["target_type", "User"], ["token", "UM-XgDXaJ8ew9HVaAZ04WgirLcwHtF8rhp6J4jQozZ6A"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 460 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UM-XgDXaJ8ew9HVaAZ04WgirLcwHtF8rhp6J4jQozZ6A' 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'RzyOxAWFDMPcurJtUXCN_gqvheox6d_yDkST6XvAs0Lw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1776], ["target_type", "User"], ["token", "RzyOxAWFDMPcurJtUXCN_gqvheox6d_yDkST6XvAs0Lw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 461 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QCzR9yUXMrlWhXnGlAYAFwufIUoERJmh4Qn3UllARsgA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00], ["target_id", 1777], ["target_type", "User"], ["token", "QCzR9yUXMrlWhXnGlAYAFwufIUoERJmh4Qn3UllARsgA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:16:46 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.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", Wed, 11 Mar 2015 23:18:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:21 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1779 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1779], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1779 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1779 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 15ms (Views: 8.6ms | ActiveRecord: 1.2ms)  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1780 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1780], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1780 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1780], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1780 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1780], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1780 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 24ms (Views: 22.7ms | ActiveRecord: 0.4ms)  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1781 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1781 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1781 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1866"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1781 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1866') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1781]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1781 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1866 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.2ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1866 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1782 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1782 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1782 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1869"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1782 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1869') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1782]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1782 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1869 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 1.9ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1869"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1782 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1869') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.3ms)  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1783 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1783 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1783 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1783 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1784 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1784], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1875"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1784 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1875')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1784 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1875')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1875]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1785 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1785], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1876"]} SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1785 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1876')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1785 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1876')) Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1786 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1786], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1786 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1786 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) 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" = 1786) LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1786], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1786 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.2ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1786 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1787 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1787], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1787 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1788 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1788], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.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" = 1788) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1788], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1788 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.4ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1789 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1789], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1789) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1789], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1789 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", 339]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1790 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1790], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1790 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'sW80nshGLVOu5aVEU6rIjQLiP5a5a4n_3vD3O1r74mmQ' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1790], ["target_type", "User"], ["token", "sW80nshGLVOu5aVEU6rIjQLiP5a5a4n_3vD3O1r74mmQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"sW80nshGLVOu5aVEU6rIjQLiP5a5a4n_3vD3O1r74mmQ"} NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'sW80nshGLVOu5aVEU6rIjQLiP5a5a4n_3vD3O1r74mmQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'sW80nshGLVOu5aVEU6rIjQLiP5a5a4n_3vD3O1r74mmQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1790]]  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1790) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1790], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 463 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 3.2ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1791 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1791], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1791 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1792 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1792], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1792 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1793 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1793], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1794 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1794], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1795 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1795], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1795 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1886 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:18:22 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1796 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1796], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1796 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1887 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:18:22 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1797 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1797], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1797 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1888 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1798 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1798], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1798 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1889 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1799 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1799], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1799 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1800], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1891 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1800 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1891) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1891]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1800]] 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" = 1800 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1801], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) 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" = 1801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1801], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1893 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1801 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1893)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1802], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1894 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1894]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1802]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1802 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5EO3T3wX9x5h6YVwgD3QNQoyg8IG731Bt1ug3n41HRaA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1802], ["target_type", "User"], ["token", "5EO3T3wX9x5h6YVwgD3QNQoyg8IG731Bt1ug3n41HRaA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.2ms) Date: Thu, 12 Mar 2015 10:18:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cd3e7d566_27bc3fcdd1065bec4766e@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) 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" = 1803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1803], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1895 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1804], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1804) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1804], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1896]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1804]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1805 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1805], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1897]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1805]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1805 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1806 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1806], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1806 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1806 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1898 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1898]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1806]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1806 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1806 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JNcBgxr93zUsX6wA4XZHugF8nuQ_ILNTGmGepFrleFoQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1806], ["target_type", "User"], ["token", "JNcBgxr93zUsX6wA4XZHugF8nuQ_ILNTGmGepFrleFoQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.1ms) Date: Thu, 12 Mar 2015 10:18:22 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cd3e8d0a2_27bc3fcdd1065bec47751@Antons-MacBook-Pro.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.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1807], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1899]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1807]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1808], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1900]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1808]] 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" = 1808 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1808]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1900 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) 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" = 1809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1809], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1809], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1902]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1809]] NewPostNotification Load (0.3ms) 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" = 1809 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1809]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1901 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1809]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1902 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1810 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1810], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1810 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '0ROsBtP3aBi6c7h2vxsn0w1o48RwanPh40YcYPjjkAJA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1810], ["target_type", "User"], ["token", "0ROsBtP3aBi6c7h2vxsn0w1o48RwanPh40YcYPjjkAJA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 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" = 1811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1811], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1811 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'm0MswqQzw19cLIFfLk1ZngtQ54wrrLp6eSpg6_eKsEbQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1811], ["target_type", "User"], ["token", "m0MswqQzw19cLIFfLk1ZngtQ54wrrLp6eSpg6_eKsEbQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1811 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1812 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["state", "pending"], ["target_id", 1812], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1812 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'F6czB8ipGUE369ejMihI5gsegr_h52kzTqpYJg1Yt9xw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1812], ["target_type", "User"], ["token", "F6czB8ipGUE369ejMihI5gsegr_h52kzTqpYJg1Yt9xw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 468 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1812 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rdaTWizWEkxOPJx79DtWQA7jK2-Hupen3aaI-V5mgwvw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1812], ["target_type", "User"], ["token", "rdaTWizWEkxOPJx79DtWQA7jK2-Hupen3aaI-V5mgwvw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1813) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1813], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 342 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1813) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1813 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1814) 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1814], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 343 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1814) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1814 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1815) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1815], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 344 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1815) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1815) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1815 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1815 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 344]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1815 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1816 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", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1816], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tNejPXOqBmctcpGq5qD_zQ3RseEpDdGAKL3vvs1xEVtA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1817], ["target_type", "User"], ["token", "tNejPXOqBmctcpGq5qD_zQ3RseEpDdGAKL3vvs1xEVtA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tNejPXOqBmctcpGq5qD_zQ3RseEpDdGAKL3vvs1xEVtA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) 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" = 'Ag-Q-X7rKDEasDH5Z_a4PQKG3FeJjvj48E3ew94wTBuA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1818], ["target_type", "User"], ["token", "Ag-Q-X7rKDEasDH5Z_a4PQKG3FeJjvj48E3ew94wTBuA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 471 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Ag-Q-X7rKDEasDH5Z_a4PQKG3FeJjvj48E3ew94wTBuA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.1ms) 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" = 'N59Pa-Hc4sbh2jVzfMVEOAADKe4E29NchzDt4ePcB3KA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1819], ["target_type", "User"], ["token", "N59Pa-Hc4sbh2jVzfMVEOAADKe4E29NchzDt4ePcB3KA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 472 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zSzUr3lF-gMt6ad0u_2zwwrseTKkT-radbA2q0podsrg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00], ["target_id", 1820], ["target_type", "User"], ["token", "zSzUr3lF-gMt6ad0u_2zwwrseTKkT-radbA2q0podsrg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:18:22 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (3.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1822 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1822], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.4ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1822 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1822 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.4ms | ActiveRecord: 1.0ms)  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1823 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1823], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1823 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1823], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1823 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1823], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1823 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 26ms (Views: 24.4ms | ActiveRecord: 0.6ms)  (0.5ms) 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1824 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1824], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1824 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1824], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1824 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1824], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1911"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1824 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1911') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1824]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1824 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1911 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.1ms | ActiveRecord: 2.4ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1911 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1825 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1825], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1825 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1825], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1825 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1825], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1914"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1825 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1914') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1825]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1825 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1914 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 1.7ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1914"} NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1825 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1914') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.1ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1826 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1826 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1826 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.5ms) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1826 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.1ms) 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1827 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1827], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1920"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1827 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1920')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1827 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1920')) Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1920]]  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1828 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1828], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1921"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1828 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1921')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1828 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1921')) Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.8ms)  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1829 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1829 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1829) 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 13ms (Views: 0.3ms | ActiveRecord: 1.9ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1829 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1830 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1830], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1830 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.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1830 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1830 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.7ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1830 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1831 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1831], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1831) 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1831], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1831 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1832 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1832], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1832) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1832], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 347]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 0.9ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1833 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1833], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1833 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'e-5a5Mi_xzEYifr3D_OpXguxmcv2IoZpfmUwTue3OgFQ' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1833], ["target_type", "User"], ["token", "e-5a5Mi_xzEYifr3D_OpXguxmcv2IoZpfmUwTue3OgFQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"e-5a5Mi_xzEYifr3D_OpXguxmcv2IoZpfmUwTue3OgFQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'e-5a5Mi_xzEYifr3D_OpXguxmcv2IoZpfmUwTue3OgFQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'e-5a5Mi_xzEYifr3D_OpXguxmcv2IoZpfmUwTue3OgFQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1833]]  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1833) 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1833], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 474 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 2.8ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1834 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1834], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1834 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) 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" = 1835 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1835], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1835 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1836 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1836], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1837 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1837], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1838 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1838], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1838 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1931 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1839 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1839], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1839 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1932 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1840 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1840], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1840 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1933 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) 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" = 1841 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1841], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1841 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1934 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1842 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1842], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1842 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1843], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1936 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1843 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1936) 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", 1936]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1843]] NewPostNotification Load (0.3ms) 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" = 1843 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1844], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1844], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1938 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) 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" = 1844 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1938)  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1845], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1845 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" = 1845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1939 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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", 1939]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1845]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1845 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qKcbv4Z4w1Ycs3LWe6ygUg8t0rSjl7qXvzOKd_GQi9uA' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1845], ["target_type", "User"], ["token", "qKcbv4Z4w1Ycs3LWe6ygUg8t0rSjl7qXvzOKd_GQi9uA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.2ms) Date: Thu, 12 Mar 2015 10:22:18 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ce2ae523c_2b733ffb21865be47643b@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1846], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 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" = 1846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1940 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1847 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1847], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1847) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1847], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1941]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1847]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1847 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1848], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1942]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1848]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.1ms) 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" = 1849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["state", "pending"], ["target_id", 1849], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1943 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1943]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1849]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1849 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dT0UVunxbxbTo26AGMHeLAJbC-xLJCRc2uIihqC423TQ' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00], ["target_id", 1849], ["target_type", "User"], ["token", "dT0UVunxbxbTo26AGMHeLAJbC-xLJCRc2uIihqC423TQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.9ms) Date: Thu, 12 Mar 2015 10:22:19 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ce2b14d9_2b733ffb21865be47655c@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1850 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1850], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1944]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1850]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1850 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1851 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1851], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1945]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1851]] NewPostNotification Load (0.3ms) 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" = 1851 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1851]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1851 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1945 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1852], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1852], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1947]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1852]] 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" = 1852 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1852]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1946 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1852]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1947 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1853 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1853], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1853 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rsm0qT36JuBdzqV3Hc9urAdPPmaE_vxWOmfBOMUtAOng' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1853], ["target_type", "User"], ["token", "rsm0qT36JuBdzqV3Hc9urAdPPmaE_vxWOmfBOMUtAOng"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1854], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1854 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nfjp60Xs0IQi1Z1pFl977QQT-WztDgKzQDxJeWZ8MdSQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1854], ["target_type", "User"], ["token", "nfjp60Xs0IQi1Z1pFl977QQT-WztDgKzQDxJeWZ8MdSQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1854 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1855 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["state", "pending"], ["target_id", 1855], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1855 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2S8zW-7pKlsUcyISI4CwXAj54qvWkwi6W7QBvog3Z2xw' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1855], ["target_type", "User"], ["token", "2S8zW-7pKlsUcyISI4CwXAj54qvWkwi6W7QBvog3Z2xw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 479 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1855 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WmmD1oOczFj5MfSsNiWi6w3ztoaABrSmIlZqiQhtXbOA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1855], ["target_type", "User"], ["token", "WmmD1oOczFj5MfSsNiWi6w3ztoaABrSmIlZqiQhtXbOA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1856) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1856], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 350 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1856) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1857) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1857], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 351 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1857) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1857 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1858) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1858], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 352 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1858) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1858) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1858 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1858 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 352]]  (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" = 1858 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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 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" = 1859 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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1859], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 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" = 'xN5S2hbic_2ShaLyOAjLAAY0detBJda14gQIs9IJZkLQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1860], ["target_type", "User"], ["token", "xN5S2hbic_2ShaLyOAjLAAY0detBJda14gQIs9IJZkLQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xN5S2hbic_2ShaLyOAjLAAY0detBJda14gQIs9IJZkLQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) 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" = 'tumKDKdnWRgm0DsiJuYbyQw3SmaSYkpZZR1_SZbemYKQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1861], ["target_type", "User"], ["token", "tumKDKdnWRgm0DsiJuYbyQw3SmaSYkpZZR1_SZbemYKQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 482 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tumKDKdnWRgm0DsiJuYbyQw3SmaSYkpZZR1_SZbemYKQ' 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", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) 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" = 'Hh4aa55BNxfURlebGf1B0wYQHVrjtXcxL5ouV0OZetcw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1862], ["target_type", "User"], ["token", "Hh4aa55BNxfURlebGf1B0wYQHVrjtXcxL5ouV0OZetcw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 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) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 483 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'g3pOhS-3q0zH3Ru9s9nQygoG2K0GemVMlR4gl2mZMLKA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00], ["target_id", 1863], ["target_type", "User"], ["token", "g3pOhS-3q0zH3Ru9s9nQygoG2K0GemVMlR4gl2mZMLKA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:22:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) 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.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms) Completed 200 OK in 9ms (Views: 7.3ms | ActiveRecord: 0.0ms)  (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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) 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" = 1865 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1865], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1865 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (1.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1865 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 13ms (Views: 6.8ms | ActiveRecord: 1.8ms)  (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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1866 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1866], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1866 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1866], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1866 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1866], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1866 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 26ms (Views: 24.9ms | ActiveRecord: 0.5ms)  (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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1867 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1867], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1867 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1867], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1867 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1867], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1956"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1867 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1956') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1867]]  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1867 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1956 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 1.2ms | ActiveRecord: 3.3ms) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1956 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1868 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1868], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1868 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1868], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 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" = 1868 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1868], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1959"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1868 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1959') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1868]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1868 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1959 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"1959"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1868 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1959') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.5ms)  (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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1869 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1869], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1869 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1869], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1869 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1869], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1869 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 2ms (ActiveRecord: 0.6ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1869 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1870 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1870], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1965"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1870 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1965')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1870 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1965')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms) NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1965]]  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1871 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1871], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["1966"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1871 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1966')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1871 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1966')) Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1872 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1872], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1872 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1872) LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["target_id", 1872], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.3ms) NotifyUser::Unsubscribe Load (1.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1873 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1873], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1873 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1874 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1874], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) 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.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" = 1874) 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["target_id", 1874], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1874 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 6ms (ActiveRecord: 1.5ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.5ms) 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1875 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1875], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1875) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["target_id", 1875], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1875 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 355]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 3ms (ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1876 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1876], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 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" = 1876 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lE_OjMosOcqvAo6sMeNzdwa6ZVumeiDhZezYHUz5ANQg' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["target_id", 1876], ["target_type", "User"], ["token", "lE_OjMosOcqvAo6sMeNzdwa6ZVumeiDhZezYHUz5ANQg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"lE_OjMosOcqvAo6sMeNzdwa6ZVumeiDhZezYHUz5ANQg"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lE_OjMosOcqvAo6sMeNzdwa6ZVumeiDhZezYHUz5ANQg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lE_OjMosOcqvAo6sMeNzdwa6ZVumeiDhZezYHUz5ANQg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1876]]  (0.3ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1876) 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["target_id", 1876], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 485 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.6ms) NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["state", "pending"], ["target_id", 1877], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1877 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1878 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["state", "pending"], ["target_id", 1878], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1878 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:18 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1879 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1879], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1880 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1880], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1881 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1881], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1881 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1976 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1882 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1882], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (1.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1882 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1977 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 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" = 1883 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1883], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1883 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1978 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1884 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1884], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1884 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1979 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.1ms) 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 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" = 1885 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1885], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1885 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1886], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1981 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1886 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1981) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1981]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1886]] NewPostNotification Load (0.3ms) 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" = 1886 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1887], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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" = 1887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1887], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1983 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1887 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1983)  (0.2ms) ROLLBACK  (0.4ms) 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1888 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1888], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1888 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1888 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1984 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1984]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1888]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1888 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1888 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '0p4VkSovaJZqu_Lg9MNtIASecvWyxxaHu4L23hKRMDGA' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1888], ["target_type", "User"], ["token", "0p4VkSovaJZqu_Lg9MNtIASecvWyxxaHu4L23hKRMDGA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (10.4ms) Date: Thu, 12 Mar 2015 10:24:19 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cea3227ab_2e333fcf91465be063097@Antons-MacBook-Pro.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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1889 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1889], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1889 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1985 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1890], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1890) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1890], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1986]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1890]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1891], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1987]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1891]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1892], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1988 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1988]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1892]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1892 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NH54W6qipuSVDPyW66Aeagv8vu68SHBJJ5tzPFVLLOJg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1892], ["target_type", "User"], ["token", "NH54W6qipuSVDPyW66Aeagv8vu68SHBJJ5tzPFVLLOJg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.4ms) Date: Thu, 12 Mar 2015 10:24:19 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500cea3349db_2e333fcf91465be063115@Antons-MacBook-Pro.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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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" = 1893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1893], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1989]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1893]]  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1894], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1990]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1894]] 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" = 1894 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1894]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1990 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1895 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1895], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1895 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1895], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1992]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1895]] 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" = 1895 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1895]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1895 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1991 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1895]]  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1895 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1992 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 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" = 1896 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1896], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 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" = 1896 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Po3AIMFo_7pSQFi2k8rxGgBZ-MvYfpw3X7R3F_0QlIuA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1896], ["target_type", "User"], ["token", "Po3AIMFo_7pSQFi2k8rxGgBZ-MvYfpw3X7R3F_0QlIuA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1897], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1897 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.4ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LpQcVM6pcooZkrpnxETmVwZv_sriX5Mu3KzR0oAHS9ZA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1897], ["target_type", "User"], ["token", "LpQcVM6pcooZkrpnxETmVwZv_sriX5Mu3KzR0oAHS9ZA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1897 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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" = 1898 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["state", "pending"], ["target_id", 1898], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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" = 1898 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NvNb8g__tc9bdUjxcGuG3gPHBSREqfri91spIu2LB5DQ' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1898], ["target_type", "User"], ["token", "NvNb8g__tc9bdUjxcGuG3gPHBSREqfri91spIu2LB5DQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 490 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1898 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KjWhX_o7eg2x3IIgZ3Ys6QIeZ7FNdzZO07OFLRgTT5Pw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1898], ["target_type", "User"], ["token", "KjWhX_o7eg2x3IIgZ3Ys6QIeZ7FNdzZO07OFLRgTT5Pw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1899) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1899], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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"."id" != 358 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1899) LIMIT 1  (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" = 1899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1900) 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1900], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 359 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1900) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1900 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1901) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1901], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 360 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1901) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" = 1901) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 360]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1902 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1902], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'n0z2A1NyAyQGH3BU1E3MgwIbAiKX3aDVLamL-Uuc7qSw' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1903], ["target_type", "User"], ["token", "n0z2A1NyAyQGH3BU1E3MgwIbAiKX3aDVLamL-Uuc7qSw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'n0z2A1NyAyQGH3BU1E3MgwIbAiKX3aDVLamL-Uuc7qSw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) 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" = 'RQIfJtLWe-o40g2AkcbdcgCdce06c-HoD78OLEkOXMyg' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1904], ["target_type", "User"], ["token", "RQIfJtLWe-o40g2AkcbdcgCdce06c-HoD78OLEkOXMyg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 493 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'RQIfJtLWe-o40g2AkcbdcgCdce06c-HoD78OLEkOXMyg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.1ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.4ms) 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" = 'PkO-t27CEU6iY-wyDlew0AGP6xBMH9nZHcr_BoMttqMg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1905], ["target_type", "User"], ["token", "PkO-t27CEU6iY-wyDlew0AGP6xBMH9nZHcr_BoMttqMg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 494 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hBPUJ4FxJGk4Do5WOr_39gskOGUhjT8UBJ-nh9Rc2kww' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00], ["target_id", 1906], ["target_type", "User"], ["token", "hBPUJ4FxJGk4Do5WOr_39gskOGUhjT8UBJ-nh9Rc2kww"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:19 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (3.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/anton/workspace/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms) Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1908 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1908], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1908 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1908 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12ms (Views: 6.4ms | ActiveRecord: 1.2ms)  (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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1909 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1909], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 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" = 1909 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1909], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1909 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1909], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1909 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 30ms (Views: 28.7ms | ActiveRecord: 0.5ms)  (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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1910 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1910], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1910 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1910], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1910 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1910], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"2001"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1910 AND "notify_user_notifications"."target_type" = 'User' AND (id = '2001') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1910]]  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1910 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2001 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 1.3ms | ActiveRecord: 3.0ms) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 2001 ORDER BY "notify_user_notifications"."id" ASC 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1911 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1911], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 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" = 1911 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1911], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 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" = 1911 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1911], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"2004"} NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1911 AND "notify_user_notifications"."target_type" = 'User' AND (id = '2004') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1911]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1911 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2004 [["state", "read"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 2.0ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"2004"} NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1911 AND "notify_user_notifications"."target_type" = 'User' AND (id = '2004') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 2.4ms)  (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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1912 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1912], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1912 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1912], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1912 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1912], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1912 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 3ms (ActiveRecord: 0.7ms) NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1912 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1913 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1913], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["2010"]} SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1913 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('2010')) NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1913 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('2010')) Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.7ms) NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 2010]]  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1914 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1914], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["2011"]} SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1914 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('2011')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1914 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('2011')) Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.9ms)  (0.3ms) 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1915 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1915], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1915 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.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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" = 1915) 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["target_id", 1915], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 2.4ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1916 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1916], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1916 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.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.6ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 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" = 1917 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1917], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"}  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1917) 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["target_id", 1917], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1917 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 5ms (ActiveRecord: 1.3ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.2ms) ROLLBACK  (0.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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1918 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1918], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1918) 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["target_id", 1918], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 363]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4ms (ActiveRecord: 1.1ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:32 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" = 1919 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", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1919], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 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" = 1919 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jxMbVVgSwzVU0ivZrfoskg4JGQj-_BUDdhfjkWHvJ8EQ' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["target_id", 1919], ["target_type", "User"], ["token", "jxMbVVgSwzVU0ivZrfoskg4JGQj-_BUDdhfjkWHvJ8EQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"jxMbVVgSwzVU0ivZrfoskg4JGQj-_BUDdhfjkWHvJ8EQ"} NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jxMbVVgSwzVU0ivZrfoskg4JGQj-_BUDdhfjkWHvJ8EQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jxMbVVgSwzVU0ivZrfoskg4JGQj-_BUDdhfjkWHvJ8EQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1919]]  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1919) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00], ["target_id", 1919], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 496 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:32 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.5ms) NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.4ms) BEGIN NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1920], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1920 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1921], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1921 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1922], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1922 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1923], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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" = 1924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1924], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1925], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2022 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1926 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1926], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1926 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2023 [["params", {"listing_id"=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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.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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1927 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1927], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 1927 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2024 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1928], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2025 [["params", {:listing_id=>1}], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) 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.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1929 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1929], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1929 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1930 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1930], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1930 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1930 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2027 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1930 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2027) NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 2027]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1930]] NewPostNotification Load (0.3ms) 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" = 1930 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1931 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1931], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1931 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1931], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1931 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1931 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2029 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) 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" = 1931 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2029)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 1932 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1932], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1932 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1932 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2030 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 2030]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1932]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1932 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" = 1932 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8OwWCaP-urZTjPTpYY_JIAQTplSSBt_4JSqvwSQcWdqA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1932], ["target_type", "User"], ["token", "8OwWCaP-urZTjPTpYY_JIAQTplSSBt_4JSqvwSQcWdqA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.2ms) Date: Thu, 12 Mar 2015 10:24:33 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ceb13082a_30383fd35e463be46326d@Antons-MacBook-Pro.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.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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 1933 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1933], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1933 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2031 [["state", "pending_no_aggregation"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1934 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1934], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1934) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1934], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 2032]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1934]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1934 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1935 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1935], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 2033]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1935]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1935 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1936 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1936], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1936 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1936 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2034 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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", 2034]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1936]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1936 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1936 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.2ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'FrVxvIwWNwHmJ1GrDp7sgA6UeRu8qz1LnuNnUmogH9JA' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1936], ["target_type", "User"], ["token", "FrVxvIwWNwHmJ1GrDp7sgA6UeRu8qz1LnuNnUmogH9JA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (7.3ms) Date: Thu, 12 Mar 2015 10:24:33 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <5500ceb141734_30383fd35e463be46335f@Antons-MacBook-Pro.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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 1937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1937], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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", 2035]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1937]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 1938 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1938], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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", 2036]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1938]] NewPostNotification Load (0.3ms) 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" = 1938 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.2ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1938]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1938 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2036 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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" = 1939 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1939], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1939 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1939], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 2038]] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1939]] 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" = 1939 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (0.1ms) SAVEPOINT active_record_1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1939]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1939 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2037 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1939]]  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1939 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2038 [["state", "sent"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1940 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1940], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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" = 1940 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xdRCR3wFHTMVfmll1hXwyAEm0plEnlep5xoTRuyizwgw' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1940], ["target_type", "User"], ["token", "xdRCR3wFHTMVfmll1hXwyAEm0plEnlep5xoTRuyizwgw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1941], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1941 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JwtpVX9ET35inaosE63tIQ0hs5ouOAxnVWVJbCQzLHtw' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1941], ["target_type", "User"], ["token", "JwtpVX9ET35inaosE63tIQ0hs5ouOAxnVWVJbCQzLHtw"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1941 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["state", "pending"], ["target_id", 1942], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1942 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gRf4KyoiwhjqoOhu3McB6gk7136A_7XrXxzFk2DJpAdQ' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1942], ["target_type", "User"], ["token", "gRf4KyoiwhjqoOhu3McB6gk7136A_7XrXxzFk2DJpAdQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 501 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1942 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1  (0.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" = '9eqy_PA0aOnYAcy7NWEzzw2fqO0zozU_UU9cxJodbozg' LIMIT 1 SQL (0.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1942], ["target_type", "User"], ["token", "9eqy_PA0aOnYAcy7NWEzzw2fqO0zozU_UU9cxJodbozg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1943) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1943], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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"."id" != 366 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1943) LIMIT 1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1943 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.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1944) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1944], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 367 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1944) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1944 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) 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" = 1945) LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1945], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 368 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1945) LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.2ms) 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" = 1945) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1945 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1945 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 368]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1945 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 1946 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1946], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pzpQSNRC96f4kSvbfbcm4g53RBpbpJQdnogWdA0S8d2w' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1947], ["target_type", "User"], ["token", "pzpQSNRC96f4kSvbfbcm4g53RBpbpJQdnogWdA0S8d2w"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pzpQSNRC96f4kSvbfbcm4g53RBpbpJQdnogWdA0S8d2w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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" = 'EIXZ-TIyAXJpk2RVpQyE8w2c12EtlWOYSHTDv9ZP4DIg' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1948], ["target_type", "User"], ["token", "EIXZ-TIyAXJpk2RVpQyE8w2c12EtlWOYSHTDv9ZP4DIg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 504 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EIXZ-TIyAXJpk2RVpQyE8w2c12EtlWOYSHTDv9ZP4DIg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (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", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) 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" = 'B7zBmZDDJhjF2X_tE2Qgjguo17UEDAbnFZSe9UxlBsWA' LIMIT 1 SQL (0.3ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1949], ["target_type", "User"], ["token", "B7zBmZDDJhjF2X_tE2Qgjguo17UEDAbnFZSe9UxlBsWA"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 505 [["active", false], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xnNFT8PJ1vyyVzJj3SFqTgsSo5mEU2vBRM6P5hk0mSvg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 11 Mar 2015 23:24:33 UTC +00:00], ["target_id", 1950], ["target_type", "User"], ["token", "xnNFT8PJ1vyyVzJj3SFqTgsSo5mEU2vBRM6P5hk0mSvg"], ["type", "NewPostNotification"], ["updated_at", Wed, 11 Mar 2015 23:24:33 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.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK