notify_user 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ccbda4d4f6f0bd85a37c2e9295789c8c3c28844
4
- data.tar.gz: f8f67249b41082e9af5dc4686bb3f85639360507
3
+ metadata.gz: b2e451b7b44796f73fc946a6a5719c88c15bab5b
4
+ data.tar.gz: c172d6b03cee3e231e1a51bbcdd815ddc209f9e1
5
5
  SHA512:
6
- metadata.gz: b9258b901edd1eb111a33354aafc2aa668b7520587594fad58e03d5d887042836633cc620a8b49d167220ebb16cac1c18423c78d9d45d8fc9bbbf76d4d5eaf78
7
- data.tar.gz: ae8fd4a46fde87ffe996adc8e42e63b667a5b0525ceb269205a76e437a17df21209ff5f7f8e59d1298f4eee57cec35738b0d3059b094aa80876808cf8712f42f
6
+ metadata.gz: 620d8ffd2ced292710226663faff087f5be2b25ab576785ed4855cdb04afabde6a6c8eeba0b3e4069cd92eb86bbd6617e694a473d9dd10d2a2d10f226600bbff
7
+ data.tar.gz: 9f6e7f78c21f67134c45d45db1e3662d31063d08d8105960bf599b186b90ad3fa46da3bf5f14c0e94b5cc454b868b36c3fe04f31090723ed8aaad6f252090fe6
@@ -3,11 +3,22 @@ class NotifyUser::BaseNotificationsController < ApplicationController
3
3
  before_filter :authenticate!, :except => [:unauth_unsubscribe]
4
4
 
5
5
  def index
6
+ collection
7
+ respond_to_method
8
+ end
9
+
10
+ def collection
6
11
  @notifications = NotifyUser::BaseNotification.for_target(@user)
7
12
  .order("created_at DESC")
8
13
  .limit(30)
9
- .page(params[:page]).per(params[:per_page])
14
+ collection_pagination
15
+ end
16
+
17
+ def collection_pagination
18
+ @notifications = @notifications.page(params[:page]).per(params[:per_page])
19
+ end
10
20
 
21
+ def respond_to_method
11
22
  respond_to do |format|
12
23
  format.html
13
24
  format.json {render :json => @notifications, meta: { pagination: { per_page: @notifications.limit_value, total_pages: @notifications.total_pages, total_objects: @notifications.total_count } }}
@@ -1,3 +1,3 @@
1
1
  module NotifyUser
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1072,3 +1072,1039 @@ o here.
1072
1072
   (0.1ms) ROLLBACK
1073
1073
   (0.1ms) BEGIN
1074
1074
   (0.1ms) ROLLBACK
1075
+  (0.1ms) BEGIN
1076
+  (0.2ms) SAVEPOINT active_record_1
1077
+ SQL (4.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1078
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1079
+ Processing by NotifyUser::NotificationsController#index as HTML
1080
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms)
1081
+ Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 0.0ms)
1082
+  (0.3ms) ROLLBACK
1083
+  (0.1ms) BEGIN
1084
+  (0.2ms) SAVEPOINT active_record_1
1085
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1086
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1087
+  (0.2ms) SAVEPOINT active_record_1
1088
+  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 43 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
1089
+ SQL (1.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", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 43], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1090
+  (0.3ms) RELEASE SAVEPOINT active_record_1
1091
+ Processing by NotifyUser::NotificationsController#index as JSON
1092
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 43 AND "notify_user_notifications"."target_type" = 'User'
1093
+ NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 43 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
1094
+ Completed 200 OK in 16ms (Views: 10.7ms | ActiveRecord: 1.5ms)
1095
+  (0.2ms) ROLLBACK
1096
+  (0.2ms) BEGIN
1097
+  (0.2ms) SAVEPOINT active_record_1
1098
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1099
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1100
+  (0.1ms) SAVEPOINT active_record_1
1101
+  (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'
1102
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 44], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1103
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1104
+  (0.1ms) SAVEPOINT active_record_1
1105
+  (0.3ms) 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'
1106
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 44], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1107
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1108
+  (0.1ms) SAVEPOINT active_record_1
1109
+  (0.3ms) 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'
1110
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 44], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1111
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1112
+ Processing by NotifyUser::NotificationsController#index as HTML
1113
+ NotifyUser::BaseNotification Load (0.8ms) 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
1114
+ Completed 200 OK in 45ms (Views: 42.8ms | ActiveRecord: 0.8ms)
1115
+  (0.3ms) ROLLBACK
1116
+  (0.2ms) BEGIN
1117
+  (0.1ms) SAVEPOINT active_record_1
1118
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1119
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1120
+  (0.1ms) SAVEPOINT active_record_1
1121
+  (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'
1122
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 45], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1123
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1124
+  (0.1ms) SAVEPOINT active_record_1
1125
+  (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'
1126
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 45], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1127
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1128
+  (0.1ms) SAVEPOINT active_record_1
1129
+  (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'
1130
+ SQL (0.4ms) INSERT INTO "notify_user_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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 45], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1131
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1132
+ Processing by NotifyUser::NotificationsController#read as HTML
1133
+ Parameters: {"id"=>"45"}
1134
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 45 AND "notify_user_notifications"."target_type" = 'User' AND (id = '45') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1135
+  (0.1ms) SAVEPOINT active_record_1
1136
+ User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 45]]
1137
+  (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'
1138
+ 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" = 45 [["state", "read"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1139
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1140
+ Completed 200 OK in 16ms (Views: 1.7ms | ActiveRecord: 3.1ms)
1141
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 45 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1142
+  (0.2ms) ROLLBACK
1143
+  (0.1ms) BEGIN
1144
+  (0.2ms) SAVEPOINT active_record_1
1145
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1146
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1147
+  (0.1ms) SAVEPOINT active_record_1
1148
+  (0.4ms) 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'
1149
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 46], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1150
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1151
+  (0.1ms) SAVEPOINT active_record_1
1152
+  (0.4ms) 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'
1153
+ SQL (0.4ms) INSERT INTO "notify_user_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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 46], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1154
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1155
+  (0.1ms) SAVEPOINT active_record_1
1156
+  (0.4ms) 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'
1157
+ 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", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 46], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1158
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1159
+ Processing by NotifyUser::NotificationsController#mark_all as HTML
1160
+ SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 46 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))
1161
+ Redirected to http://test.host/notify_user/notifications
1162
+ Completed 302 Found in 3ms (ActiveRecord: 1.0ms)
1163
+ 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 (state IN ('["pending","sent"]'))
1164
+  (0.2ms) ROLLBACK
1165
+  (0.1ms) BEGIN
1166
+  (0.1ms) SAVEPOINT active_record_1
1167
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1168
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1169
+  (0.1ms) SAVEPOINT active_record_1
1170
+  (0.6ms) 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'
1171
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 47], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1172
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1173
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
1174
+ Parameters: {"ids"=>["51"]}
1175
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 47 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('51'))
1176
+ 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 IN ('51'))
1177
+ Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.0ms)
1178
+ 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", 51]]
1179
+  (0.2ms) ROLLBACK
1180
+  (0.1ms) BEGIN
1181
+  (0.2ms) SAVEPOINT active_record_1
1182
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1183
+  (0.3ms) RELEASE SAVEPOINT active_record_1
1184
+  (0.1ms) SAVEPOINT active_record_1
1185
+  (0.4ms) 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'
1186
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 48], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1187
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1188
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
1189
+ Parameters: {"ids"=>["52"]}
1190
+ 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 (id IN ('52'))
1191
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 48 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('52'))
1192
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.9ms)
1193
+  (0.2ms) ROLLBACK
1194
+  (0.1ms) BEGIN
1195
+  (0.1ms) SAVEPOINT active_record_1
1196
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1197
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1198
+  (0.1ms) SAVEPOINT active_record_1
1199
+  (0.6ms) 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'
1200
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 49], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1201
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1202
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 49 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
1203
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
1204
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
1205
+  (0.4ms) 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'
1206
+  (0.2ms) SAVEPOINT active_record_1
1207
+ 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" = 49) LIMIT 1
1208
+ 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", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 49], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1209
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1210
+  (0.6ms) 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" = 'action_mailer'
1211
+  (0.4ms) 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'
1212
+ Completed 200 OK in 28ms (Views: 0.5ms | ActiveRecord: 3.3ms)
1213
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 49 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
1214
+  (0.2ms) ROLLBACK
1215
+  (0.1ms) BEGIN
1216
+  (0.2ms) SAVEPOINT active_record_1
1217
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1218
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1219
+  (0.2ms) SAVEPOINT active_record_1
1220
+  (0.4ms) 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'
1221
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 50], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1222
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1223
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 50 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
1224
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
1225
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
1226
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 50 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
1227
+  (0.4ms) 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" = 'action_mailer'
1228
+  (0.4ms) 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'
1229
+ Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 1.2ms)
1230
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 50 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
1231
+  (0.2ms) ROLLBACK
1232
+  (0.1ms) BEGIN
1233
+  (0.1ms) SAVEPOINT active_record_1
1234
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1235
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1236
+  (0.2ms) SAVEPOINT active_record_1
1237
+  (0.4ms) 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'
1238
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 51], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1239
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1240
+ Processing by NotifyUser::NotificationsController#unsubscribe as HTML
1241
+ Parameters: {"type"=>"NewPostNotification"}
1242
+  (0.2ms) SAVEPOINT active_record_1
1243
+ 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" = 51) LIMIT 1
1244
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 51], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1245
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1246
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
1247
+ Completed 302 Found in 5ms (ActiveRecord: 1.2ms)
1248
+ NotifyUser::Unsubscribe Load (1.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
1249
+  (0.2ms) ROLLBACK
1250
+  (0.2ms) BEGIN
1251
+  (0.3ms) SAVEPOINT active_record_1
1252
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1253
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1254
+  (0.1ms) SAVEPOINT active_record_1
1255
+  (0.4ms) 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'
1256
+ SQL (0.4ms) INSERT INTO "notify_user_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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 52], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1257
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1258
+  (0.2ms) SAVEPOINT active_record_1
1259
+ 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" = 52) LIMIT 1
1260
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 52], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1261
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1262
+ Processing by NotifyUser::NotificationsController#subscribe as HTML
1263
+ Parameters: {"type"=>"NewPostNotification"}
1264
+ NotifyUser::Unsubscribe Load (0.4ms) 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'
1265
+  (0.1ms) SAVEPOINT active_record_1
1266
+ SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 13]]
1267
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1268
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
1269
+ Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
1270
+ NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
1271
+  (0.1ms) ROLLBACK
1272
+  (0.1ms) BEGIN
1273
+  (0.1ms) SAVEPOINT active_record_1
1274
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1275
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1276
+  (0.1ms) SAVEPOINT active_record_1
1277
+  (0.4ms) 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'
1278
+ SQL (0.4ms) INSERT INTO "notify_user_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, 28 Apr 2014 04:17:56 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 53], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1279
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1280
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 53 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1281
+  (0.1ms) SAVEPOINT active_record_1
1282
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'biTOl8u9D6ZRsgGgz6R0SQO7_8d30m7jDTBIOxyTplUA' LIMIT 1
1283
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 53], ["target_type", "User"], ["token", "biTOl8u9D6ZRsgGgz6R0SQO7_8d30m7jDTBIOxyTplUA"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1284
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1285
+ Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
1286
+ Parameters: {"type"=>"NewPostNotification", "token"=>"biTOl8u9D6ZRsgGgz6R0SQO7_8d30m7jDTBIOxyTplUA"}
1287
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'biTOl8u9D6ZRsgGgz6R0SQO7_8d30m7jDTBIOxyTplUA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
1288
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'biTOl8u9D6ZRsgGgz6R0SQO7_8d30m7jDTBIOxyTplUA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1289
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 53]]
1290
+  (0.1ms) SAVEPOINT active_record_1
1291
+ 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" = 53) LIMIT 1
1292
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 53], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1293
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1294
+  (0.1ms) SAVEPOINT active_record_1
1295
+ SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 14 [["active", false], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1296
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1297
+ Completed 200 OK in 10ms (Views: 0.4ms | ActiveRecord: 3.3ms)
1298
+ 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
1299
+  (0.1ms) ROLLBACK
1300
+  (0.1ms) BEGIN
1301
+ 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
1302
+  (0.2ms) SAVEPOINT active_record_1
1303
+  (0.7ms) ROLLBACK TO SAVEPOINT active_record_1
1304
+ 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
1305
+  (0.1ms) SAVEPOINT active_record_1
1306
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1307
+  (0.3ms) ROLLBACK
1308
+  (0.2ms) BEGIN
1309
+ 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
1310
+  (0.1ms) SAVEPOINT active_record_1
1311
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1312
+ 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
1313
+  (0.1ms) SAVEPOINT active_record_1
1314
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
1315
+  (0.2ms) ROLLBACK
1316
+  (0.1ms) BEGIN
1317
+ 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
1318
+  (0.1ms) SAVEPOINT active_record_1
1319
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
1320
+ 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
1321
+  (0.1ms) SAVEPOINT active_record_1
1322
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1323
+  (0.2ms) ROLLBACK
1324
+  (0.1ms) BEGIN
1325
+  (0.1ms) SAVEPOINT active_record_1
1326
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1327
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1328
+  (0.1ms) SAVEPOINT active_record_1
1329
+  (0.4ms) 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'
1330
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 54], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1331
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1332
+  (0.1ms) ROLLBACK
1333
+  (0.1ms) BEGIN
1334
+  (0.1ms) SAVEPOINT active_record_1
1335
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1336
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1337
+  (0.1ms) SAVEPOINT active_record_1
1338
+  (0.6ms) 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'
1339
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 55], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1340
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1341
+  (0.1ms) ROLLBACK
1342
+  (0.1ms) BEGIN
1343
+  (0.1ms) SAVEPOINT active_record_1
1344
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1345
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1346
+  (0.1ms) SAVEPOINT active_record_1
1347
+  (0.4ms) 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'
1348
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 56], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1349
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1350
+  (0.1ms) SAVEPOINT active_record_1
1351
+  (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'
1352
+ 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" = 60 [["params", {"listing_id"=>1}], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1353
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1354
+ 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
1355
+  (0.1ms) ROLLBACK
1356
+  (0.1ms) BEGIN
1357
+  (0.1ms) SAVEPOINT active_record_1
1358
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1359
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1360
+  (0.1ms) SAVEPOINT active_record_1
1361
+  (0.7ms) 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'
1362
+ 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", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 57], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1363
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1364
+  (0.2ms) SAVEPOINT active_record_1
1365
+  (0.6ms) 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'
1366
+ 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" = 61 [["params", {"listing_id"=>1}], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1367
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1368
+ 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
1369
+  (0.1ms) ROLLBACK
1370
+  (0.1ms) BEGIN
1371
+  (0.1ms) SAVEPOINT active_record_1
1372
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1373
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1374
+  (0.2ms) SAVEPOINT active_record_1
1375
+  (0.8ms) 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'
1376
+ 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", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 58], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1377
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1378
+  (0.1ms) SAVEPOINT active_record_1
1379
+  (0.4ms) 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'
1380
+ 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" = 62 [["params", {:listing_id=>1}], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1381
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1382
+ 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
1383
+  (0.1ms) ROLLBACK
1384
+  (0.1ms) BEGIN
1385
+  (0.1ms) SAVEPOINT active_record_1
1386
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1387
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1388
+  (0.1ms) SAVEPOINT active_record_1
1389
+  (0.4ms) 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'
1390
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 59], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1391
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1392
+  (0.1ms) SAVEPOINT active_record_1
1393
+  (0.4ms) 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'
1394
+ 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" = 63 [["params", {:listing_id=>1}], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1395
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1396
+ 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
1397
+  (0.1ms) ROLLBACK
1398
+  (0.1ms) BEGIN
1399
+  (0.1ms) SAVEPOINT active_record_1
1400
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1401
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1402
+  (0.1ms) SAVEPOINT active_record_1
1403
+  (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'
1404
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 60], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1405
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1406
+  (0.1ms) SAVEPOINT active_record_1
1407
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1408
+  (0.1ms) ROLLBACK
1409
+  (0.1ms) BEGIN
1410
+  (0.1ms) SAVEPOINT active_record_1
1411
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1412
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1413
+  (0.2ms) SAVEPOINT active_record_1
1414
+  (0.5ms) 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'
1415
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 61], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1416
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1417
+  (0.2ms) SAVEPOINT active_record_1
1418
+  (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'
1419
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1420
+  (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" = 61 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 65)
1421
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 65]]
1422
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 61]]
1423
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 61 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1424
+  (0.1ms) SAVEPOINT active_record_1
1425
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 61]]
1426
+  (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'
1427
+ 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" = 65 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1428
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1429
+  (0.1ms) SAVEPOINT active_record_1
1430
+  (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'
1431
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1432
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 65 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1433
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 61]]
1434
+  (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" = 'action_mailer'
1435
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 65 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1436
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 61]]
1437
+  (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" = 'apns'
1438
+  (0.1ms) ROLLBACK
1439
+  (0.1ms) BEGIN
1440
+  (0.1ms) SAVEPOINT active_record_1
1441
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1442
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1443
+  (0.1ms) SAVEPOINT active_record_1
1444
+  (0.4ms) 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'
1445
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 62], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1446
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1447
+  (0.1ms) SAVEPOINT active_record_1
1448
+  (0.4ms) 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'
1449
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1450
+  (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" = 62 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 66)
1451
+  (0.2ms) SAVEPOINT active_record_1
1452
+  (0.4ms) 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'
1453
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 62], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1454
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1455
+  (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" = 62 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 67)
1456
+  (0.2ms) ROLLBACK
1457
+  (0.1ms) BEGIN
1458
+  (0.1ms) SAVEPOINT active_record_1
1459
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1460
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1461
+  (0.1ms) SAVEPOINT active_record_1
1462
+  (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'
1463
+ SQL (0.3ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 63], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1464
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1465
+  (0.1ms) SAVEPOINT active_record_1
1466
+  (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'
1467
+ SQL (0.3ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 63], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1468
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1469
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 69]]
1470
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 63]]
1471
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 63 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1472
+  (0.1ms) SAVEPOINT active_record_1
1473
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 63]]
1474
+  (0.4ms) 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'
1475
+ 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" = 68 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1476
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1477
+  (0.1ms) SAVEPOINT active_record_1
1478
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 63]]
1479
+  (0.4ms) 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'
1480
+ 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" = 69 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1481
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1482
+  (0.1ms) SAVEPOINT active_record_1
1483
+  (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'
1484
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1485
+  (0.1ms) SAVEPOINT active_record_1
1486
+  (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'
1487
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1488
+  (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" = 'action_mailer'
1489
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 63 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1490
+  (0.1ms) SAVEPOINT active_record_1
1491
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jLM93zI1WpDKdbGM0XXnMgTDJRmUmYp0W5l5A2M9yVlQ' LIMIT 1
1492
+ 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", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 63], ["target_type", "User"], ["token", "jLM93zI1WpDKdbGM0XXnMgTDJRmUmYp0W5l5A2M9yVlQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1493
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1494
+
1495
+ Sent mail to user@example.com (8.3ms)
1496
+ Date: Mon, 28 Apr 2014 14:17:56 +1000
1497
+ From: please-change-me-at-config-initializers-notify-user@example.com
1498
+ To: user@example.com
1499
+ Message-ID: <535dd674da3a2_13513fefc482dbf869595@wp.local.mail>
1500
+ Subject: Rails402: You have new Newpostnotification notifications.
1501
+ Mime-Version: 1.0
1502
+ Content-Type: text/html;
1503
+ charset=UTF-8
1504
+ Content-Transfer-Encoding: quoted-printable
1505
+
1506
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1507
+ tml4/strict.dtd">
1508
+ <html>
1509
+ <head>
1510
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1511
+ "/>
1512
+ <title></title>
1513
+ </head>
1514
+
1515
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1516
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1517
+ ing: optimizeLegibility;">
1518
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1519
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1520
+ Logo
1521
+ </div>
1522
+ </div>
1523
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1524
+ ">
1525
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1526
+ =
1527
+
1528
+ <div>
1529
+ New Post Notification happened. =
1530
+
1531
+ </div>
1532
+ <div>
1533
+ New Post Notification happened. =
1534
+
1535
+ </div>
1536
+
1537
+ </div>
1538
+ </div>
1539
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1540
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1541
+ <p style=3D"text-align: center;">
1542
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
1543
+ _unsubscribe?token=3DjLM93zI1WpDKdbGM0XXnMgTDJRmUmYp0W5l5A2M9yVlQ&amp;typ=
1544
+ e=3DNewPostNotification">Unsubscribe</a>
1545
+ </p>
1546
+ <p style=3D"text-align: center;">
1547
+ This is the default generated layout. A privacy declaration could g=
1548
+ o here.
1549
+ </p>
1550
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1551
+ =C2=A9 MyCompany Pty Ltd
1552
+ </p>
1553
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1554
+ ABN 123 456 789
1555
+ </p>
1556
+ </div>
1557
+ </div>
1558
+ </body>
1559
+ </html>=
1560
+
1561
+  (0.2ms) ROLLBACK
1562
+  (0.1ms) BEGIN
1563
+  (0.1ms) SAVEPOINT active_record_1
1564
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1565
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1566
+  (0.1ms) SAVEPOINT active_record_1
1567
+  (0.4ms) 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'
1568
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 64], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1569
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1570
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 70]]
1571
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 64]]
1572
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "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'
1573
+  (0.1ms) SAVEPOINT active_record_1
1574
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 64]]
1575
+  (0.4ms) 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'
1576
+ 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" = 70 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1577
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1578
+  (0.1ms) SAVEPOINT active_record_1
1579
+  (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'
1580
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1581
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 70 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1582
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 64]]
1583
+  (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" = 'action_mailer'
1584
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 64 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1585
+  (0.1ms) SAVEPOINT active_record_1
1586
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Xs_NpRA1VAdO14Mq4q4I_A06nFjvqJVjapWdhkPiFbKg' LIMIT 1
1587
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 64], ["target_type", "User"], ["token", "Xs_NpRA1VAdO14Mq4q4I_A06nFjvqJVjapWdhkPiFbKg"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1588
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1589
+
1590
+ Sent mail to user@example.com (18.0ms)
1591
+ Date: Mon, 28 Apr 2014 14:17:56 +1000
1592
+ From: please-change-me-at-config-initializers-notify-user@example.com
1593
+ To: user@example.com
1594
+ Message-ID: <535dd674e6514_13513fefc482dbf86961c@wp.local.mail>
1595
+ Subject: Rails402: You have a new Newpostnotification notification.
1596
+ Mime-Version: 1.0
1597
+ Content-Type: text/html;
1598
+ charset=UTF-8
1599
+ Content-Transfer-Encoding: quoted-printable
1600
+
1601
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1602
+ tml4/strict.dtd">
1603
+ <html>
1604
+ <head>
1605
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1606
+ "/>
1607
+ <title></title>
1608
+ </head>
1609
+
1610
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1611
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1612
+ ing: optimizeLegibility;">
1613
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1614
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1615
+ Logo
1616
+ </div>
1617
+ </div>
1618
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1619
+ ">
1620
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1621
+ New Post Notification happened.
1622
+
1623
+ </div>
1624
+ </div>
1625
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1626
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1627
+ <p style=3D"text-align: center;">
1628
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
1629
+ _unsubscribe?token=3DXs_NpRA1VAdO14Mq4q4I_A06nFjvqJVjapWdhkPiFbKg&amp;typ=
1630
+ e=3DNewPostNotification">Unsubscribe</a>
1631
+ </p>
1632
+ <p style=3D"text-align: center;">
1633
+ This is the default generated layout. A privacy declaration could g=
1634
+ o here.
1635
+ </p>
1636
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1637
+ =C2=A9 MyCompany Pty Ltd
1638
+ </p>
1639
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1640
+ ABN 123 456 789
1641
+ </p>
1642
+ </div>
1643
+ </div>
1644
+ </body>
1645
+ </html>=
1646
+
1647
+  (0.4ms) 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" = 'apns'
1648
+  (0.2ms) ROLLBACK
1649
+  (0.1ms) BEGIN
1650
+  (0.1ms) SAVEPOINT active_record_1
1651
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1652
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1653
+  (0.1ms) SAVEPOINT active_record_1
1654
+ NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 65) LIMIT 1
1655
+ 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, 28 Apr 2014 04:17:56 UTC +00:00], ["target_id", 65], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1656
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1657
+  (0.1ms) SAVEPOINT active_record_1
1658
+  (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'
1659
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1660
+ 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
1661
+  (0.1ms) ROLLBACK
1662
+  (0.1ms) BEGIN
1663
+  (0.1ms) SAVEPOINT active_record_1
1664
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1665
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1666
+  (0.1ms) SAVEPOINT active_record_1
1667
+  (0.4ms) 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'
1668
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 66], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1669
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1670
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 71 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1671
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 66]]
1672
+  (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'
1673
+  (0.1ms) ROLLBACK
1674
+  (0.1ms) BEGIN
1675
+  (0.1ms) SAVEPOINT active_record_1
1676
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1677
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1678
+  (0.1ms) SAVEPOINT active_record_1
1679
+  (0.4ms) 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'
1680
+ SQL (0.3ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 67], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1681
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1682
+  (0.1ms) SAVEPOINT active_record_1
1683
+  (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'
1684
+ SQL (0.3ms) INSERT INTO "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, 28 Apr 2014 04:17:56 UTC +00:00], ["state", "pending"], ["target_id", 67], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1685
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1686
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 73]]
1687
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 67]]
1688
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 67 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1689
+  (0.1ms) SAVEPOINT active_record_1
1690
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 67]]
1691
+  (0.4ms) 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'
1692
+ 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" = 72 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:56 UTC +00:00]]
1693
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1694
+  (0.1ms) SAVEPOINT active_record_1
1695
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 67]]
1696
+  (0.4ms) 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'
1697
+ 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, 28 Apr 2014 04:17:56 UTC +00:00]]
1698
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1699
+  (0.1ms) SAVEPOINT active_record_1
1700
+  (0.4ms) 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'
1701
+  (0.3ms) RELEASE SAVEPOINT active_record_1
1702
+  (0.1ms) SAVEPOINT active_record_1
1703
+  (0.5ms) 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'
1704
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1705
+  (0.4ms) 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" = 'action_mailer'
1706
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 67 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1707
+  (0.1ms) SAVEPOINT active_record_1
1708
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UDa4MKx7NzpybnNQAaZKHw9p5GO0dF6acLFBONa5HRqQ' LIMIT 1
1709
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 67], ["target_type", "User"], ["token", "UDa4MKx7NzpybnNQAaZKHw9p5GO0dF6acLFBONa5HRqQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1710
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1711
+
1712
+ Sent mail to user@example.com (6.2ms)
1713
+ Date: Mon, 28 Apr 2014 14:17:57 +1000
1714
+ From: please-change-me-at-config-initializers-notify-user@example.com
1715
+ To: user@example.com
1716
+ Message-ID: <535dd6753a1d_13513fefc482dbf8697f5@wp.local.mail>
1717
+ Subject: Rails402: You have new Newpostnotification notifications.
1718
+ Mime-Version: 1.0
1719
+ Content-Type: text/html;
1720
+ charset=UTF-8
1721
+ Content-Transfer-Encoding: quoted-printable
1722
+
1723
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1724
+ tml4/strict.dtd">
1725
+ <html>
1726
+ <head>
1727
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1728
+ "/>
1729
+ <title></title>
1730
+ </head>
1731
+
1732
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1733
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1734
+ ing: optimizeLegibility;">
1735
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1736
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1737
+ Logo
1738
+ </div>
1739
+ </div>
1740
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1741
+ ">
1742
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1743
+ =
1744
+
1745
+ <div>
1746
+ New Post Notification happened. =
1747
+
1748
+ </div>
1749
+ <div>
1750
+ New Post Notification happened. =
1751
+
1752
+ </div>
1753
+
1754
+ </div>
1755
+ </div>
1756
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1757
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1758
+ <p style=3D"text-align: center;">
1759
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
1760
+ _unsubscribe?token=3DUDa4MKx7NzpybnNQAaZKHw9p5GO0dF6acLFBONa5HRqQ&amp;typ=
1761
+ e=3DNewPostNotification">Unsubscribe</a>
1762
+ </p>
1763
+ <p style=3D"text-align: center;">
1764
+ This is the default generated layout. A privacy declaration could g=
1765
+ o here.
1766
+ </p>
1767
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1768
+ =C2=A9 MyCompany Pty Ltd
1769
+ </p>
1770
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1771
+ ABN 123 456 789
1772
+ </p>
1773
+ </div>
1774
+ </div>
1775
+ </body>
1776
+ </html>=
1777
+
1778
+  (0.3ms) ROLLBACK
1779
+  (0.2ms) BEGIN
1780
+  (0.1ms) SAVEPOINT active_record_1
1781
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1782
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1783
+  (0.1ms) SAVEPOINT active_record_1
1784
+  (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" = 'NewPostNotification'
1785
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:57 UTC +00:00], ["state", "pending"], ["target_id", 68], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1786
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1787
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 74]]
1788
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 68]]
1789
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 68 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1790
+  (0.1ms) SAVEPOINT active_record_1
1791
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 68]]
1792
+  (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'
1793
+ 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" = 74 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1794
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1795
+  (0.1ms) SAVEPOINT active_record_1
1796
+  (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" = 'NewPostNotification'
1797
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1798
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 74 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1799
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 68]]
1800
+  (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" = 'action_mailer'
1801
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 68 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1802
+  (0.1ms) SAVEPOINT active_record_1
1803
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HFBlJ2R258sLpWsNcEevKgaQfMlcr5p8Nfh5jW83nklg' LIMIT 1
1804
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 68], ["target_type", "User"], ["token", "HFBlJ2R258sLpWsNcEevKgaQfMlcr5p8Nfh5jW83nklg"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1805
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1806
+
1807
+ Sent mail to user@example.com (6.1ms)
1808
+ Date: Mon, 28 Apr 2014 14:17:57 +1000
1809
+ From: please-change-me-at-config-initializers-notify-user@example.com
1810
+ To: user@example.com
1811
+ Message-ID: <535dd675de40_13513fefc482dbf869861@wp.local.mail>
1812
+ Subject: Rails402: You have a new Newpostnotification notification.
1813
+ Mime-Version: 1.0
1814
+ Content-Type: text/html;
1815
+ charset=UTF-8
1816
+ Content-Transfer-Encoding: quoted-printable
1817
+
1818
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1819
+ tml4/strict.dtd">
1820
+ <html>
1821
+ <head>
1822
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1823
+ "/>
1824
+ <title></title>
1825
+ </head>
1826
+
1827
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1828
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1829
+ ing: optimizeLegibility;">
1830
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1831
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1832
+ Logo
1833
+ </div>
1834
+ </div>
1835
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1836
+ ">
1837
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1838
+ New Post Notification happened.
1839
+
1840
+ </div>
1841
+ </div>
1842
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1843
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1844
+ <p style=3D"text-align: center;">
1845
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
1846
+ _unsubscribe?token=3DHFBlJ2R258sLpWsNcEevKgaQfMlcr5p8Nfh5jW83nklg&amp;typ=
1847
+ e=3DNewPostNotification">Unsubscribe</a>
1848
+ </p>
1849
+ <p style=3D"text-align: center;">
1850
+ This is the default generated layout. A privacy declaration could g=
1851
+ o here.
1852
+ </p>
1853
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1854
+ =C2=A9 MyCompany Pty Ltd
1855
+ </p>
1856
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1857
+ ABN 123 456 789
1858
+ </p>
1859
+ </div>
1860
+ </div>
1861
+ </body>
1862
+ </html>=
1863
+
1864
+  (0.2ms) ROLLBACK
1865
+  (0.2ms) BEGIN
1866
+  (0.3ms) SAVEPOINT active_record_1
1867
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1868
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1869
+  (0.1ms) SAVEPOINT active_record_1
1870
+  (0.4ms) 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'
1871
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:57 UTC +00:00], ["state", "pending"], ["target_id", 69], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1872
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1873
+  (0.1ms) SAVEPOINT active_record_1
1874
+  (0.4ms) 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'
1875
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1876
+  (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'
1877
+  (0.1ms) SAVEPOINT active_record_1
1878
+  (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'
1879
+ 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" = 75 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1880
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1881
+  (0.1ms) SAVEPOINT active_record_1
1882
+  (0.4ms) 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'
1883
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1884
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 75 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1885
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 69]]
1886
+  (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'
1887
+  (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" = 'apns'
1888
+  (0.1ms) ROLLBACK
1889
+  (0.1ms) BEGIN
1890
+  (0.1ms) SAVEPOINT active_record_1
1891
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1892
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1893
+  (0.1ms) SAVEPOINT active_record_1
1894
+ 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" = 70) LIMIT 1
1895
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 70], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1896
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1897
+  (0.1ms) SAVEPOINT active_record_1
1898
+  (0.4ms) 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'
1899
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1900
+  (0.1ms) SAVEPOINT active_record_1
1901
+  (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'
1902
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1903
+  (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'
1904
+  (0.2ms) ROLLBACK
1905
+  (0.1ms) BEGIN
1906
+  (0.1ms) SAVEPOINT active_record_1
1907
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1908
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1909
+  (0.1ms) SAVEPOINT active_record_1
1910
+ 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" = 71) LIMIT 1
1911
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 71], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1912
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1913
+  (0.1ms) SAVEPOINT active_record_1
1914
+  (0.5ms) 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'
1915
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["state", "pending"], ["target_id", 71], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1916
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1917
+  (0.1ms) SAVEPOINT active_record_1
1918
+  (0.4ms) 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'
1919
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1920
+  (0.4ms) 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'
1921
+  (0.1ms) SAVEPOINT active_record_1
1922
+  (0.6ms) 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'
1923
+ 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" = 76 [["state", "sent"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1924
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1925
+  (0.1ms) SAVEPOINT active_record_1
1926
+  (0.4ms) 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'
1927
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1928
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 76 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1929
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 71]]
1930
+  (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'
1931
+  (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" = 'apns'
1932
+  (0.2ms) ROLLBACK
1933
+  (0.1ms) BEGIN
1934
+  (0.1ms) SAVEPOINT active_record_1
1935
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1936
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1937
+  (0.1ms) SAVEPOINT active_record_1
1938
+  (0.4ms) 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'
1939
+ SQL (0.4ms) INSERT INTO "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, 28 Apr 2014 04:17:57 UTC +00:00], ["state", "pending"], ["target_id", 72], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1940
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1941
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 72 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1942
+  (0.1ms) SAVEPOINT active_record_1
1943
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'u6vVYVqjWS15CgIKmKI2dgMe6o_8rpah23GuguMRjeCA' LIMIT 1
1944
+ 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", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 72], ["target_type", "User"], ["token", "u6vVYVqjWS15CgIKmKI2dgMe6o_8rpah23GuguMRjeCA"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1945
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1946
+  (0.1ms) ROLLBACK
1947
+  (0.1ms) BEGIN
1948
+  (0.1ms) SAVEPOINT active_record_1
1949
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1950
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1951
+  (0.1ms) SAVEPOINT active_record_1
1952
+  (0.4ms) 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'
1953
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["state", "pending"], ["target_id", 73], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1954
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1955
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 73 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1956
+  (0.1ms) SAVEPOINT active_record_1
1957
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LSo4vY3yZkgw_czqZO_skQK76JRvmXMR8tlO0acQTCaQ' LIMIT 1
1958
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 73], ["target_type", "User"], ["token", "LSo4vY3yZkgw_czqZO_skQK76JRvmXMR8tlO0acQTCaQ"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1959
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1960
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 73 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
1961
+  (0.2ms) ROLLBACK
1962
+  (0.1ms) BEGIN
1963
+  (0.1ms) SAVEPOINT active_record_1
1964
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1965
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1966
+  (0.1ms) SAVEPOINT active_record_1
1967
+  (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'
1968
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["state", "pending"], ["target_id", 74], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1969
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1970
+ NotifyUser::UserHash Load (0.5ms) 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
1971
+  (0.1ms) SAVEPOINT active_record_1
1972
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'kLiF3TraOs_NC2WUYqqL3AA9qkAGhimafcqgAbKbCxEg' LIMIT 1
1973
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 74], ["target_type", "User"], ["token", "kLiF3TraOs_NC2WUYqqL3AA9qkAGhimafcqgAbKbCxEg"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1974
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1975
+  (0.1ms) SAVEPOINT active_record_1
1976
+ 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, 28 Apr 2014 04:17:57 UTC +00:00]]
1977
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1978
+ 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
1979
+  (0.1ms) SAVEPOINT active_record_1
1980
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qQj-v-rTk15SQbxJ2b-E3AhT65qCUAA8h4Wno9TIWt-Q' LIMIT 1
1981
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 74], ["target_type", "User"], ["token", "qQj-v-rTk15SQbxJ2b-E3AhT65qCUAA8h4Wno9TIWt-Q"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1982
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1983
+  (0.1ms) ROLLBACK
1984
+  (0.2ms) BEGIN
1985
+  (0.1ms) SAVEPOINT active_record_1
1986
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1987
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1988
+  (0.1ms) SAVEPOINT active_record_1
1989
+ NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 75) LIMIT 1
1990
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 75], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
1991
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1992
+  (0.1ms) SAVEPOINT active_record_1
1993
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 18 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 75) LIMIT 1
1994
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1995
+  (0.2ms) SAVEPOINT active_record_1
1996
+  (0.5ms) 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'
1997
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1998
+  (0.2ms) ROLLBACK
1999
+  (0.1ms) BEGIN
2000
+  (0.1ms) SAVEPOINT active_record_1
2001
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2002
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2003
+  (0.1ms) SAVEPOINT active_record_1
2004
+ 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" = 76) LIMIT 1
2005
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 76], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2006
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2007
+  (0.1ms) SAVEPOINT active_record_1
2008
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 19 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 76) LIMIT 1
2009
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2010
+  (0.1ms) SAVEPOINT active_record_1
2011
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 76) LIMIT 1
2012
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2013
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
2014
+  (0.1ms) ROLLBACK
2015
+  (0.1ms) BEGIN
2016
+  (0.1ms) SAVEPOINT active_record_1
2017
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2018
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2019
+  (0.1ms) SAVEPOINT active_record_1
2020
+ 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" = 77) LIMIT 1
2021
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 77], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2022
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2023
+  (0.1ms) SAVEPOINT active_record_1
2024
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 20 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 77) LIMIT 1
2025
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2026
+  (0.1ms) SAVEPOINT active_record_1
2027
+ NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS 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
2028
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2029
+  (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'
2030
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 77 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2031
+  (0.1ms) SAVEPOINT active_record_1
2032
+ SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 20]]
2033
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2034
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 77 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2035
+  (7.8ms) ROLLBACK
2036
+  (0.2ms) BEGIN
2037
+  (0.2ms) SAVEPOINT active_record_1
2038
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2039
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2040
+  (0.2ms) SAVEPOINT active_record_1
2041
+  (0.5ms) 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'
2042
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 78], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2043
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2044
+  (0.1ms) ROLLBACK
2045
+  (0.1ms) BEGIN
2046
+  (0.1ms) SAVEPOINT active_record_1
2047
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2048
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2049
+  (0.2ms) SAVEPOINT active_record_1
2050
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'd-7RFJ7NvnmDOS_1kQmvnQjE_lZLd8k2HZIZqlQzNDYA' LIMIT 1
2051
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 79], ["target_type", "User"], ["token", "d-7RFJ7NvnmDOS_1kQmvnQjE_lZLd8k2HZIZqlQzNDYA"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2052
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2053
+  (0.1ms) SAVEPOINT active_record_1
2054
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2055
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'd-7RFJ7NvnmDOS_1kQmvnQjE_lZLd8k2HZIZqlQzNDYA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
2056
+  (0.1ms) ROLLBACK
2057
+  (0.1ms) BEGIN
2058
+  (0.1ms) SAVEPOINT active_record_1
2059
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2060
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2061
+  (0.1ms) SAVEPOINT active_record_1
2062
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GUTVF1ABPzQVYVCtlqmj7Qzr79WMP7AstRrh62BOjmRg' LIMIT 1
2063
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 80], ["target_type", "User"], ["token", "GUTVF1ABPzQVYVCtlqmj7Qzr79WMP7AstRrh62BOjmRg"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2064
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2065
+  (0.1ms) SAVEPOINT active_record_1
2066
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2067
+  (0.1ms) SAVEPOINT active_record_1
2068
+ SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 24 [["active", false], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2069
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2070
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GUTVF1ABPzQVYVCtlqmj7Qzr79WMP7AstRrh62BOjmRg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
2071
+  (0.2ms) ROLLBACK
2072
+  (0.1ms) BEGIN
2073
+  (0.1ms) SAVEPOINT active_record_1
2074
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2075
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2076
+  (0.1ms) SAVEPOINT active_record_1
2077
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5Bx1cN73fe2A3ARgRUZx5gtvSmizmCWb7asGhAPiZNOA' LIMIT 1
2078
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 81], ["target_type", "User"], ["token", "5Bx1cN73fe2A3ARgRUZx5gtvSmizmCWb7asGhAPiZNOA"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2079
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2080
+  (0.1ms) SAVEPOINT active_record_1
2081
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2082
+  (0.2ms) SAVEPOINT active_record_1
2083
+ SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 25 [["active", false], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2084
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2085
+  (0.1ms) ROLLBACK
2086
+  (0.2ms) BEGIN
2087
+  (0.2ms) SAVEPOINT active_record_1
2088
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00], ["email", "user@example.com"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2089
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2090
+  (0.1ms) SAVEPOINT active_record_1
2091
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mG9DpfvnCo72ppQBZMWR4wD2J5l1B-6y3Ef68ncElEAg' LIMIT 1
2092
+ 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, 28 Apr 2014 04:17:57 UTC +00:00], ["target_id", 82], ["target_type", "User"], ["token", "mG9DpfvnCo72ppQBZMWR4wD2J5l1B-6y3Ef68ncElEAg"], ["type", "NewPostNotification"], ["updated_at", Mon, 28 Apr 2014 04:17:57 UTC +00:00]]
2093
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2094
+  (0.1ms) SAVEPOINT active_record_1
2095
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2096
+  (0.1ms) ROLLBACK
2097
+  (0.1ms) BEGIN
2098
+  (0.2ms) ROLLBACK
2099
+  (0.2ms) BEGIN
2100
+  (0.2ms) ROLLBACK
2101
+  (0.1ms) BEGIN
2102
+  (0.2ms) ROLLBACK
2103
+  (0.1ms) BEGIN
2104
+  (0.1ms) ROLLBACK
2105
+  (0.1ms) BEGIN
2106
+  (0.1ms) ROLLBACK
2107
+  (0.1ms) BEGIN
2108
+  (0.1ms) ROLLBACK
2109
+  (0.1ms) BEGIN
2110
+  (0.1ms) ROLLBACK