notify_user 0.0.7 → 0.0.8

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.
@@ -2108,3 +2108,1039 @@ o here.
2108
2108
   (0.1ms) ROLLBACK
2109
2109
   (0.1ms) BEGIN
2110
2110
   (0.1ms) ROLLBACK
2111
+  (0.2ms) BEGIN
2112
+  (0.2ms) SAVEPOINT active_record_1
2113
+ SQL (11.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2114
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2115
+ Processing by NotifyUser::NotificationsController#index as HTML
2116
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms)
2117
+ Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.0ms)
2118
+  (0.3ms) ROLLBACK
2119
+  (0.1ms) BEGIN
2120
+  (0.1ms) SAVEPOINT active_record_1
2121
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2122
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2123
+  (0.2ms) SAVEPOINT active_record_1
2124
+  (4.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 84 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2125
+ SQL (2.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 84], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2126
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2127
+ Processing by NotifyUser::NotificationsController#index as JSON
2128
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 84 AND "notify_user_notifications"."target_type" = 'User'
2129
+ NotifyUser::BaseNotification Load (2.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 84 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
2130
+ Completed 200 OK in 20ms (Views: 12.2ms | ActiveRecord: 2.6ms)
2131
+  (0.3ms) ROLLBACK
2132
+  (0.2ms) BEGIN
2133
+  (0.1ms) SAVEPOINT active_record_1
2134
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2135
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2136
+  (0.1ms) SAVEPOINT active_record_1
2137
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 85 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2138
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 85], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2139
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2140
+  (0.1ms) SAVEPOINT active_record_1
2141
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 85 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2142
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 85], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2143
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2144
+  (0.1ms) SAVEPOINT active_record_1
2145
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 85 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2146
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 85], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2147
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2148
+ Processing by NotifyUser::NotificationsController#index as HTML
2149
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 85 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
2150
+ Completed 200 OK in 50ms (Views: 48.1ms | ActiveRecord: 0.7ms)
2151
+  (0.3ms) ROLLBACK
2152
+  (0.2ms) BEGIN
2153
+  (0.2ms) SAVEPOINT active_record_1
2154
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2155
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2156
+  (0.1ms) SAVEPOINT active_record_1
2157
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 86 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2158
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 86], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2159
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2160
+  (0.1ms) SAVEPOINT active_record_1
2161
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 86 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2162
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 86], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2163
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2164
+  (0.1ms) SAVEPOINT active_record_1
2165
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 86 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2166
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 86], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2167
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2168
+ Processing by NotifyUser::NotificationsController#read as HTML
2169
+ Parameters: {"id"=>"85"}
2170
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 86 AND "notify_user_notifications"."target_type" = 'User' AND (id = '85') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2171
+  (0.1ms) SAVEPOINT active_record_1
2172
+ User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 86]]
2173
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 86 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2174
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 85 [["state", "read"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2175
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2176
+ Completed 200 OK in 19ms (Views: 1.7ms | ActiveRecord: 2.9ms)
2177
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 85 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2178
+  (0.2ms) ROLLBACK
2179
+  (0.1ms) BEGIN
2180
+  (0.1ms) SAVEPOINT active_record_1
2181
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2182
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2183
+  (0.1ms) SAVEPOINT active_record_1
2184
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 87 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2185
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 87], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2186
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2187
+  (0.1ms) SAVEPOINT active_record_1
2188
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 87 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2189
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 87], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2190
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2191
+  (0.1ms) SAVEPOINT active_record_1
2192
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 87 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2193
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 87], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2194
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2195
+ Processing by NotifyUser::NotificationsController#mark_all as HTML
2196
+ SQL (2.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 87 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))
2197
+ Redirected to http://test.host/notify_user/notifications
2198
+ Completed 302 Found in 4ms (ActiveRecord: 2.4ms)
2199
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 87 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
2200
+  (0.2ms) ROLLBACK
2201
+  (0.1ms) BEGIN
2202
+  (0.1ms) SAVEPOINT active_record_1
2203
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2204
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2205
+  (0.1ms) SAVEPOINT active_record_1
2206
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 88 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2207
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 88], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2208
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2209
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
2210
+ Parameters: {"ids"=>["91"]}
2211
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 88 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('91'))
2212
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 88 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('91'))
2213
+ Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.8ms)
2214
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 91]]
2215
+  (0.2ms) ROLLBACK
2216
+  (0.1ms) BEGIN
2217
+  (0.1ms) SAVEPOINT active_record_1
2218
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2219
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2220
+  (0.1ms) SAVEPOINT active_record_1
2221
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 89 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2222
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 89], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2223
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2224
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
2225
+ Parameters: {"ids"=>["92"]}
2226
+ SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 89 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('92'))
2227
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 89 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('92'))
2228
+ Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 1.1ms)
2229
+  (0.2ms) ROLLBACK
2230
+  (0.1ms) BEGIN
2231
+  (0.2ms) SAVEPOINT active_record_1
2232
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2233
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2234
+  (0.1ms) SAVEPOINT active_record_1
2235
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 90 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2236
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 90], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2237
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2238
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 90 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2239
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
2240
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
2241
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 90 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2242
+  (0.2ms) SAVEPOINT active_record_1
2243
+ 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" = 90) LIMIT 1
2244
+ SQL (1.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["target_id", 90], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2245
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2246
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 90 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2247
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 90 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2248
+ Completed 200 OK in 26ms (Views: 0.4ms | ActiveRecord: 4.4ms)
2249
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 90 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2250
+  (0.2ms) ROLLBACK
2251
+  (0.1ms) BEGIN
2252
+  (0.1ms) SAVEPOINT active_record_1
2253
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2254
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2255
+  (0.1ms) SAVEPOINT active_record_1
2256
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2257
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 91], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2258
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2259
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2260
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
2261
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
2262
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2263
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2264
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2265
+ Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.1ms)
2266
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 91 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2267
+  (0.1ms) ROLLBACK
2268
+  (0.1ms) BEGIN
2269
+  (0.1ms) SAVEPOINT active_record_1
2270
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2271
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2272
+  (0.2ms) SAVEPOINT active_record_1
2273
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 92 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2274
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 92], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2275
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2276
+ Processing by NotifyUser::NotificationsController#unsubscribe as HTML
2277
+ Parameters: {"type"=>"NewPostNotification"}
2278
+  (0.2ms) SAVEPOINT active_record_1
2279
+ 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" = 92) LIMIT 1
2280
+ SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["target_id", 92], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2281
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2282
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
2283
+ Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
2284
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
2285
+  (0.1ms) ROLLBACK
2286
+  (0.1ms) BEGIN
2287
+  (0.2ms) SAVEPOINT active_record_1
2288
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2289
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2290
+  (0.1ms) SAVEPOINT active_record_1
2291
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 93 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2292
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 93], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2293
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2294
+  (0.1ms) SAVEPOINT active_record_1
2295
+ 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" = 93) LIMIT 1
2296
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["target_id", 93], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2297
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2298
+ Processing by NotifyUser::NotificationsController#subscribe as HTML
2299
+ Parameters: {"type"=>"NewPostNotification"}
2300
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 93 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2301
+  (0.1ms) SAVEPOINT active_record_1
2302
+ SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 23]]
2303
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2304
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
2305
+ Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
2306
+ NotifyUser::Unsubscribe Load (0.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
2307
+  (0.1ms) ROLLBACK
2308
+  (0.1ms) BEGIN
2309
+  (0.1ms) SAVEPOINT active_record_1
2310
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2311
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2312
+  (0.1ms) SAVEPOINT active_record_1
2313
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 94 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2314
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 94], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2315
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2316
+ NotifyUser::UserHash Load (1.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 94 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2317
+  (0.2ms) SAVEPOINT active_record_1
2318
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '41YP9-il3OfdKeAZatgp0ATjAAC3vHRUBf04BNJpwWlQ' LIMIT 1
2319
+ SQL (1.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["target_id", 94], ["target_type", "User"], ["token", "41YP9-il3OfdKeAZatgp0ATjAAC3vHRUBf04BNJpwWlQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2320
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2321
+ Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
2322
+ Parameters: {"type"=>"NewPostNotification", "token"=>"41YP9-il3OfdKeAZatgp0ATjAAC3vHRUBf04BNJpwWlQ"}
2323
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '41YP9-il3OfdKeAZatgp0ATjAAC3vHRUBf04BNJpwWlQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
2324
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '41YP9-il3OfdKeAZatgp0ATjAAC3vHRUBf04BNJpwWlQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2325
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 94]]
2326
+  (0.1ms) SAVEPOINT active_record_1
2327
+ 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" = 94) LIMIT 1
2328
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00], ["target_id", 94], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2329
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2330
+  (0.1ms) SAVEPOINT active_record_1
2331
+ SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 27 [["active", false], ["updated_at", Wed, 30 Apr 2014 03:22:30 UTC +00:00]]
2332
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2333
+ Completed 200 OK in 11ms (Views: 0.6ms | ActiveRecord: 3.2ms)
2334
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1
2335
+  (0.2ms) ROLLBACK
2336
+  (0.1ms) BEGIN
2337
+ 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
2338
+  (0.1ms) SAVEPOINT active_record_1
2339
+  (0.6ms) ROLLBACK TO SAVEPOINT active_record_1
2340
+ 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
2341
+  (0.1ms) SAVEPOINT active_record_1
2342
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2343
+  (0.2ms) ROLLBACK
2344
+  (0.1ms) BEGIN
2345
+ 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
2346
+  (0.1ms) SAVEPOINT active_record_1
2347
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2348
+ 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
2349
+  (0.2ms) SAVEPOINT active_record_1
2350
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2351
+  (0.1ms) ROLLBACK
2352
+  (0.1ms) BEGIN
2353
+ 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
2354
+  (0.1ms) SAVEPOINT active_record_1
2355
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2356
+ 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
2357
+  (0.1ms) SAVEPOINT active_record_1
2358
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2359
+  (0.1ms) ROLLBACK
2360
+  (0.1ms) BEGIN
2361
+  (0.2ms) SAVEPOINT active_record_1
2362
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2363
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2364
+  (0.1ms) SAVEPOINT active_record_1
2365
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 95 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2366
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 95], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2367
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2368
+  (0.1ms) ROLLBACK
2369
+  (0.1ms) BEGIN
2370
+  (0.1ms) SAVEPOINT active_record_1
2371
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2372
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2373
+  (0.1ms) SAVEPOINT active_record_1
2374
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 96 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2375
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 96], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2376
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2377
+  (0.2ms) ROLLBACK
2378
+  (0.1ms) BEGIN
2379
+  (0.1ms) SAVEPOINT active_record_1
2380
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2381
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2382
+  (0.1ms) SAVEPOINT active_record_1
2383
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 97 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2384
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 97], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2385
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2386
+  (0.1ms) SAVEPOINT active_record_1
2387
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 97 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2388
+ 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" = 100 [["params", {"listing_id"=>1}], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2389
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2390
+ 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
2391
+  (0.1ms) ROLLBACK
2392
+  (0.1ms) BEGIN
2393
+  (0.1ms) SAVEPOINT active_record_1
2394
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2395
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2396
+  (0.1ms) SAVEPOINT active_record_1
2397
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2398
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 98], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2399
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2400
+  (0.1ms) SAVEPOINT active_record_1
2401
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 98 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2402
+ 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" = 101 [["params", {"listing_id"=>1}], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2403
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2404
+ 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
2405
+  (0.1ms) ROLLBACK
2406
+  (0.1ms) BEGIN
2407
+  (0.1ms) SAVEPOINT active_record_1
2408
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2409
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2410
+  (0.1ms) SAVEPOINT active_record_1
2411
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 99 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2412
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 99], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2413
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2414
+  (0.1ms) SAVEPOINT active_record_1
2415
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 99 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2416
+ 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" = 102 [["params", {:listing_id=>1}], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2417
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2418
+ 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
2419
+  (0.1ms) ROLLBACK
2420
+  (0.1ms) BEGIN
2421
+  (0.1ms) SAVEPOINT active_record_1
2422
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2423
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2424
+  (0.1ms) SAVEPOINT active_record_1
2425
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 100 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2426
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 100], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2427
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2428
+  (0.1ms) SAVEPOINT active_record_1
2429
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 100 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2430
+ 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" = 103 [["params", {:listing_id=>1}], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2431
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2432
+ 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
2433
+  (0.1ms) ROLLBACK
2434
+  (0.1ms) BEGIN
2435
+  (0.1ms) SAVEPOINT active_record_1
2436
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2437
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2438
+  (0.1ms) SAVEPOINT active_record_1
2439
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 101 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2440
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 101], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2441
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2442
+  (0.2ms) SAVEPOINT active_record_1
2443
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2444
+  (0.1ms) ROLLBACK
2445
+  (0.1ms) BEGIN
2446
+  (0.1ms) SAVEPOINT active_record_1
2447
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2448
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2449
+  (0.1ms) SAVEPOINT active_record_1
2450
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2451
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 102], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2452
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2453
+  (0.2ms) SAVEPOINT active_record_1
2454
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2455
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2456
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 102 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 105)
2457
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 105]]
2458
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 102]]
2459
+ 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" = 102 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
2460
+  (0.1ms) SAVEPOINT active_record_1
2461
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 102]]
2462
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2463
+ 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" = 105 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2464
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2465
+  (0.1ms) SAVEPOINT active_record_1
2466
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2467
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2468
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 105 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2469
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 102]]
2470
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2471
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 105 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2472
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 102]]
2473
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 102 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
2474
+  (0.2ms) ROLLBACK
2475
+  (0.1ms) BEGIN
2476
+  (0.1ms) SAVEPOINT active_record_1
2477
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2478
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2479
+  (0.1ms) SAVEPOINT active_record_1
2480
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 103 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2481
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 103], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2482
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2483
+  (0.1ms) SAVEPOINT active_record_1
2484
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 103 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2485
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2486
+  (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" = 103 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 106)
2487
+  (0.1ms) SAVEPOINT active_record_1
2488
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 103 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2489
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 103], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2490
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2491
+  (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" = 103 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 107)
2492
+  (0.2ms) ROLLBACK
2493
+  (0.1ms) BEGIN
2494
+  (0.1ms) SAVEPOINT active_record_1
2495
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2496
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2497
+  (0.1ms) SAVEPOINT active_record_1
2498
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2499
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 104], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2501
+  (0.1ms) SAVEPOINT active_record_1
2502
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2503
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 104], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2504
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2505
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 109]]
2506
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 104]]
2507
+ 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" = 104 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
2508
+  (0.1ms) SAVEPOINT active_record_1
2509
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 104]]
2510
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2511
+ 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" = 108 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2513
+  (0.1ms) SAVEPOINT active_record_1
2514
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 104]]
2515
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2516
+ 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" = 109 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2517
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2518
+  (0.1ms) SAVEPOINT active_record_1
2519
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2520
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2521
+  (0.1ms) SAVEPOINT active_record_1
2522
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2523
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2524
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 104 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2525
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 104 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2526
+  (0.1ms) SAVEPOINT active_record_1
2527
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tF6dvznM2Jojb2daqZnqdAD5RULhg9i1vN9u2-YlgNqw' LIMIT 1
2528
+ SQL (1.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 104], ["target_type", "User"], ["token", "tF6dvznM2Jojb2daqZnqdAD5RULhg9i1vN9u2-YlgNqw"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2529
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2530
+
2531
+ Sent mail to user@example.com (10.6ms)
2532
+ Date: Wed, 30 Apr 2014 13:22:31 +1000
2533
+ From: please-change-me-at-config-initializers-notify-user@example.com
2534
+ To: user@example.com
2535
+ Message-ID: <53606c773dd2d_19f43fc971829bf8345bf@wp.local.mail>
2536
+ Subject: Rails402: You have new Newpostnotification notifications.
2537
+ Mime-Version: 1.0
2538
+ Content-Type: text/html;
2539
+ charset=UTF-8
2540
+ Content-Transfer-Encoding: quoted-printable
2541
+
2542
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
2543
+ tml4/strict.dtd">
2544
+ <html>
2545
+ <head>
2546
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
2547
+ "/>
2548
+ <title></title>
2549
+ </head>
2550
+
2551
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
2552
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
2553
+ ing: optimizeLegibility;">
2554
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
2555
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
2556
+ Logo
2557
+ </div>
2558
+ </div>
2559
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
2560
+ ">
2561
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
2562
+ =
2563
+
2564
+ <div>
2565
+ New Post Notification happened. =
2566
+
2567
+ </div>
2568
+ <div>
2569
+ New Post Notification happened. =
2570
+
2571
+ </div>
2572
+
2573
+ </div>
2574
+ </div>
2575
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
2576
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
2577
+ <p style=3D"text-align: center;">
2578
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
2579
+ _unsubscribe?token=3DtF6dvznM2Jojb2daqZnqdAD5RULhg9i1vN9u2-YlgNqw&amp;typ=
2580
+ e=3DNewPostNotification">Unsubscribe</a>
2581
+ </p>
2582
+ <p style=3D"text-align: center;">
2583
+ This is the default generated layout. A privacy declaration could g=
2584
+ o here.
2585
+ </p>
2586
+ <p style=3D"text-align: center; margin-bottom: 0px;">
2587
+ =C2=A9 MyCompany Pty Ltd
2588
+ </p>
2589
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
2590
+ ABN 123 456 789
2591
+ </p>
2592
+ </div>
2593
+ </div>
2594
+ </body>
2595
+ </html>=
2596
+
2597
+  (0.2ms) ROLLBACK
2598
+  (0.1ms) BEGIN
2599
+  (0.1ms) SAVEPOINT active_record_1
2600
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2601
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2602
+  (0.1ms) SAVEPOINT active_record_1
2603
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2604
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 105], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2605
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2606
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 110]]
2607
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 105]]
2608
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 105 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
2609
+  (0.1ms) SAVEPOINT active_record_1
2610
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 105]]
2611
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2612
+ 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" = 110 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2613
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2614
+  (0.2ms) SAVEPOINT active_record_1
2615
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2616
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2617
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 110 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2618
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 105]]
2619
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2620
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 105 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2621
+  (0.1ms) SAVEPOINT active_record_1
2622
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7v-hB2QQUXACa-OcL_X6kQmkelYJSuz84hr36p7apdww' LIMIT 1
2623
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 105], ["target_type", "User"], ["token", "7v-hB2QQUXACa-OcL_X6kQmkelYJSuz84hr36p7apdww"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2624
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2625
+
2626
+ Sent mail to user@example.com (5.6ms)
2627
+ Date: Wed, 30 Apr 2014 13:22:31 +1000
2628
+ From: please-change-me-at-config-initializers-notify-user@example.com
2629
+ To: user@example.com
2630
+ Message-ID: <53606c7749f7f_19f43fc971829bf834688@wp.local.mail>
2631
+ Subject: Rails402: You have a new Newpostnotification notification.
2632
+ Mime-Version: 1.0
2633
+ Content-Type: text/html;
2634
+ charset=UTF-8
2635
+ Content-Transfer-Encoding: quoted-printable
2636
+
2637
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
2638
+ tml4/strict.dtd">
2639
+ <html>
2640
+ <head>
2641
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
2642
+ "/>
2643
+ <title></title>
2644
+ </head>
2645
+
2646
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
2647
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
2648
+ ing: optimizeLegibility;">
2649
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
2650
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
2651
+ Logo
2652
+ </div>
2653
+ </div>
2654
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
2655
+ ">
2656
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
2657
+ New Post Notification happened.
2658
+
2659
+ </div>
2660
+ </div>
2661
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
2662
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
2663
+ <p style=3D"text-align: center;">
2664
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
2665
+ _unsubscribe?token=3D7v-hB2QQUXACa-OcL_X6kQmkelYJSuz84hr36p7apdww&amp;typ=
2666
+ e=3DNewPostNotification">Unsubscribe</a>
2667
+ </p>
2668
+ <p style=3D"text-align: center;">
2669
+ This is the default generated layout. A privacy declaration could g=
2670
+ o here.
2671
+ </p>
2672
+ <p style=3D"text-align: center; margin-bottom: 0px;">
2673
+ =C2=A9 MyCompany Pty Ltd
2674
+ </p>
2675
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
2676
+ ABN 123 456 789
2677
+ </p>
2678
+ </div>
2679
+ </div>
2680
+ </body>
2681
+ </html>=
2682
+
2683
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 105 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
2684
+  (0.2ms) ROLLBACK
2685
+  (0.1ms) BEGIN
2686
+  (0.1ms) SAVEPOINT active_record_1
2687
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2688
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2689
+  (0.2ms) SAVEPOINT active_record_1
2690
+ 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" = 106) LIMIT 1
2691
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 106], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2692
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2693
+  (0.1ms) SAVEPOINT active_record_1
2694
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 106 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2695
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
2696
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2697
+  (0.2ms) ROLLBACK
2698
+  (0.1ms) BEGIN
2699
+  (0.1ms) SAVEPOINT active_record_1
2700
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2701
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2702
+  (0.2ms) SAVEPOINT active_record_1
2703
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 107 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2704
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 107], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2705
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2706
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 111 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2707
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 107]]
2708
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 107 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2709
+  (0.2ms) ROLLBACK
2710
+  (0.1ms) BEGIN
2711
+  (0.1ms) SAVEPOINT active_record_1
2712
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2713
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2714
+  (0.1ms) SAVEPOINT active_record_1
2715
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2716
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 108], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2717
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2718
+  (0.1ms) SAVEPOINT active_record_1
2719
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2720
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 108], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2721
+  (0.4ms) RELEASE SAVEPOINT active_record_1
2722
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 113]]
2723
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 108]]
2724
+ 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" = 108 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
2725
+  (0.1ms) SAVEPOINT active_record_1
2726
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 108]]
2727
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2728
+ 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" = 112 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2729
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2730
+  (0.1ms) SAVEPOINT active_record_1
2731
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 108]]
2732
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2733
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 113 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2734
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2735
+  (0.1ms) SAVEPOINT active_record_1
2736
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2737
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2738
+  (0.1ms) SAVEPOINT active_record_1
2739
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2740
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2741
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 108 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2742
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 108 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2743
+  (0.1ms) SAVEPOINT active_record_1
2744
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9Y9RTnCu5acrkLowWlm-0AqM2ZvOcLAT9JFCFmAXAFzA' LIMIT 1
2745
+ SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 108], ["target_type", "User"], ["token", "9Y9RTnCu5acrkLowWlm-0AqM2ZvOcLAT9JFCFmAXAFzA"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2746
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2747
+
2748
+ Sent mail to user@example.com (7.4ms)
2749
+ Date: Wed, 30 Apr 2014 13:22:31 +1000
2750
+ From: please-change-me-at-config-initializers-notify-user@example.com
2751
+ To: user@example.com
2752
+ Message-ID: <53606c776083f_19f43fc971829bf834748@wp.local.mail>
2753
+ Subject: Rails402: You have new Newpostnotification notifications.
2754
+ Mime-Version: 1.0
2755
+ Content-Type: text/html;
2756
+ charset=UTF-8
2757
+ Content-Transfer-Encoding: quoted-printable
2758
+
2759
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
2760
+ tml4/strict.dtd">
2761
+ <html>
2762
+ <head>
2763
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
2764
+ "/>
2765
+ <title></title>
2766
+ </head>
2767
+
2768
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
2769
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
2770
+ ing: optimizeLegibility;">
2771
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
2772
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
2773
+ Logo
2774
+ </div>
2775
+ </div>
2776
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
2777
+ ">
2778
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
2779
+ =
2780
+
2781
+ <div>
2782
+ New Post Notification happened. =
2783
+
2784
+ </div>
2785
+ <div>
2786
+ New Post Notification happened. =
2787
+
2788
+ </div>
2789
+
2790
+ </div>
2791
+ </div>
2792
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
2793
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
2794
+ <p style=3D"text-align: center;">
2795
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
2796
+ _unsubscribe?token=3D9Y9RTnCu5acrkLowWlm-0AqM2ZvOcLAT9JFCFmAXAFzA&amp;typ=
2797
+ e=3DNewPostNotification">Unsubscribe</a>
2798
+ </p>
2799
+ <p style=3D"text-align: center;">
2800
+ This is the default generated layout. A privacy declaration could g=
2801
+ o here.
2802
+ </p>
2803
+ <p style=3D"text-align: center; margin-bottom: 0px;">
2804
+ =C2=A9 MyCompany Pty Ltd
2805
+ </p>
2806
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
2807
+ ABN 123 456 789
2808
+ </p>
2809
+ </div>
2810
+ </div>
2811
+ </body>
2812
+ </html>=
2813
+
2814
+  (0.2ms) ROLLBACK
2815
+  (0.2ms) BEGIN
2816
+  (0.1ms) SAVEPOINT active_record_1
2817
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2818
+  (0.4ms) RELEASE SAVEPOINT active_record_1
2819
+  (0.3ms) SAVEPOINT active_record_1
2820
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2821
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 109], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2822
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2823
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 114]]
2824
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 109]]
2825
+ 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" = 109 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
2826
+  (0.1ms) SAVEPOINT active_record_1
2827
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 109]]
2828
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2829
+ 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" = 114 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2830
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2831
+  (0.1ms) SAVEPOINT active_record_1
2832
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2833
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2834
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 114 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2835
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 109]]
2836
+  (1.1ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 109 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2837
+ NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 109 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2838
+  (0.2ms) SAVEPOINT active_record_1
2839
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'cfLQDIrjH-haWhYhfR6RGgIEJoyxL-FZ3novldmJklsA' LIMIT 1
2840
+ SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 109], ["target_type", "User"], ["token", "cfLQDIrjH-haWhYhfR6RGgIEJoyxL-FZ3novldmJklsA"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2841
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2842
+
2843
+ Sent mail to user@example.com (11.0ms)
2844
+ Date: Wed, 30 Apr 2014 13:22:31 +1000
2845
+ From: please-change-me-at-config-initializers-notify-user@example.com
2846
+ To: user@example.com
2847
+ Message-ID: <53606c776d63c_19f43fc971829bf834837@wp.local.mail>
2848
+ Subject: Rails402: You have a new Newpostnotification notification.
2849
+ Mime-Version: 1.0
2850
+ Content-Type: text/html;
2851
+ charset=UTF-8
2852
+ Content-Transfer-Encoding: quoted-printable
2853
+
2854
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
2855
+ tml4/strict.dtd">
2856
+ <html>
2857
+ <head>
2858
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
2859
+ "/>
2860
+ <title></title>
2861
+ </head>
2862
+
2863
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
2864
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
2865
+ ing: optimizeLegibility;">
2866
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
2867
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
2868
+ Logo
2869
+ </div>
2870
+ </div>
2871
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
2872
+ ">
2873
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
2874
+ New Post Notification happened.
2875
+
2876
+ </div>
2877
+ </div>
2878
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
2879
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
2880
+ <p style=3D"text-align: center;">
2881
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
2882
+ _unsubscribe?token=3DcfLQDIrjH-haWhYhfR6RGgIEJoyxL-FZ3novldmJklsA&amp;typ=
2883
+ e=3DNewPostNotification">Unsubscribe</a>
2884
+ </p>
2885
+ <p style=3D"text-align: center;">
2886
+ This is the default generated layout. A privacy declaration could g=
2887
+ o here.
2888
+ </p>
2889
+ <p style=3D"text-align: center; margin-bottom: 0px;">
2890
+ =C2=A9 MyCompany Pty Ltd
2891
+ </p>
2892
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
2893
+ ABN 123 456 789
2894
+ </p>
2895
+ </div>
2896
+ </div>
2897
+ </body>
2898
+ </html>=
2899
+
2900
+  (0.2ms) ROLLBACK
2901
+  (0.3ms) BEGIN
2902
+  (0.4ms) SAVEPOINT active_record_1
2903
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2904
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2905
+  (0.1ms) SAVEPOINT active_record_1
2906
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2907
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 110], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2908
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2909
+  (0.1ms) SAVEPOINT active_record_1
2910
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2911
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2912
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2913
+  (0.1ms) SAVEPOINT active_record_1
2914
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2915
+ SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 115 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2916
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2917
+  (0.1ms) SAVEPOINT active_record_1
2918
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2919
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2920
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 115 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2921
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 110]]
2922
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2923
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 110 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
2924
+  (0.2ms) ROLLBACK
2925
+  (0.1ms) BEGIN
2926
+  (0.2ms) SAVEPOINT active_record_1
2927
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2928
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2929
+  (0.2ms) SAVEPOINT active_record_1
2930
+ NotifyUser::Unsubscribe Exists (0.7ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 111) LIMIT 1
2931
+ SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 111], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2932
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2933
+  (0.2ms) SAVEPOINT active_record_1
2934
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2935
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2936
+  (0.1ms) SAVEPOINT active_record_1
2937
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2938
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
2939
+  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 111 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2940
+  (0.4ms) ROLLBACK
2941
+  (0.3ms) BEGIN
2942
+  (0.2ms) SAVEPOINT active_record_1
2943
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2944
+  (0.3ms) RELEASE SAVEPOINT active_record_1
2945
+  (0.2ms) SAVEPOINT active_record_1
2946
+ NotifyUser::Unsubscribe Exists (0.6ms) 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" = 112) LIMIT 1
2947
+ SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 112], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2948
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2949
+  (0.1ms) SAVEPOINT active_record_1
2950
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2951
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 112], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2952
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2953
+  (0.1ms) SAVEPOINT active_record_1
2954
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2955
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2956
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2957
+  (0.1ms) SAVEPOINT active_record_1
2958
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2959
+ 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" = 116 [["state", "sent"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2960
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2961
+  (0.1ms) SAVEPOINT active_record_1
2962
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2963
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2964
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 116 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
2965
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 112]]
2966
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
2967
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 112 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
2968
+  (0.2ms) ROLLBACK
2969
+  (0.1ms) BEGIN
2970
+  (0.1ms) SAVEPOINT active_record_1
2971
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2972
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2973
+  (0.1ms) SAVEPOINT active_record_1
2974
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 113 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2975
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 113], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2976
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2977
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 113 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2978
+  (0.2ms) SAVEPOINT active_record_1
2979
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Id40Rb4eFTnEEYhW5zJk1gekE8yVkMCSmSjNOkxZmwBg' LIMIT 1
2980
+ SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 113], ["target_type", "User"], ["token", "Id40Rb4eFTnEEYhW5zJk1gekE8yVkMCSmSjNOkxZmwBg"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2981
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2982
+  (0.2ms) ROLLBACK
2983
+  (0.1ms) BEGIN
2984
+  (0.1ms) SAVEPOINT active_record_1
2985
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2986
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2987
+  (0.1ms) SAVEPOINT active_record_1
2988
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 114 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
2989
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 114], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2990
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2991
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 114 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2992
+  (0.1ms) SAVEPOINT active_record_1
2993
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GYn7nwiTgTcv2x8b2vcvXg8-hb3g1XQNW9qxGWvftXhg' LIMIT 1
2994
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 114], ["target_type", "User"], ["token", "GYn7nwiTgTcv2x8b2vcvXg8-hb3g1XQNW9qxGWvftXhg"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
2995
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2996
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 114 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
2997
+  (0.1ms) ROLLBACK
2998
+  (0.1ms) BEGIN
2999
+  (0.1ms) SAVEPOINT active_record_1
3000
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3001
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3002
+  (0.1ms) SAVEPOINT active_record_1
3003
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 115 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
3004
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["state", "pending"], ["target_id", 115], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3005
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3006
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 115 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
3007
+  (0.1ms) SAVEPOINT active_record_1
3008
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dFeL-5OEHsR4HkIpTK8vvgnfI7flpZxw4eQkeS1sBWQA' LIMIT 1
3009
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 115], ["target_type", "User"], ["token", "dFeL-5OEHsR4HkIpTK8vvgnfI7flpZxw4eQkeS1sBWQA"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3010
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3011
+  (0.1ms) SAVEPOINT active_record_1
3012
+ SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 34 [["active", false], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3013
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3014
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 115 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
3015
+  (0.1ms) SAVEPOINT active_record_1
3016
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4nUdFh8BgQn6czQT_LWKkAapGPYD4nhRzE3nuiNgNXsg' LIMIT 1
3017
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 115], ["target_type", "User"], ["token", "4nUdFh8BgQn6czQT_LWKkAapGPYD4nhRzE3nuiNgNXsg"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3018
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3019
+  (0.1ms) ROLLBACK
3020
+  (0.1ms) BEGIN
3021
+  (0.1ms) SAVEPOINT active_record_1
3022
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3023
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3024
+  (0.1ms) SAVEPOINT active_record_1
3025
+ 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" = 116) LIMIT 1
3026
+ SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 116], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3027
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3028
+  (0.2ms) SAVEPOINT active_record_1
3029
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 28 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 116) LIMIT 1
3030
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3031
+  (0.1ms) SAVEPOINT active_record_1
3032
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 116 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
3033
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
3034
+  (0.2ms) ROLLBACK
3035
+  (0.2ms) BEGIN
3036
+  (0.1ms) SAVEPOINT active_record_1
3037
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3038
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3039
+  (0.1ms) SAVEPOINT active_record_1
3040
+ 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" = 117) LIMIT 1
3041
+ SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 117], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3042
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3043
+  (0.1ms) SAVEPOINT active_record_1
3044
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 29 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 117) LIMIT 1
3045
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3046
+  (0.1ms) SAVEPOINT active_record_1
3047
+ 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" = 117) LIMIT 1
3048
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
3049
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
3050
+  (0.1ms) ROLLBACK
3051
+  (0.1ms) BEGIN
3052
+  (0.1ms) SAVEPOINT active_record_1
3053
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3054
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3055
+  (0.1ms) SAVEPOINT active_record_1
3056
+ 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" = 118) LIMIT 1
3057
+ SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 118], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3058
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3059
+  (0.1ms) SAVEPOINT active_record_1
3060
+ NotifyUser::Unsubscribe Exists (0.3ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 30 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 118) LIMIT 1
3061
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3062
+  (0.1ms) SAVEPOINT active_record_1
3063
+ 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" = 118) LIMIT 1
3064
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
3065
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
3066
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
3067
+  (0.1ms) SAVEPOINT active_record_1
3068
+ SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 30]]
3069
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3070
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 118 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
3071
+  (0.6ms) ROLLBACK
3072
+  (0.1ms) BEGIN
3073
+  (0.1ms) SAVEPOINT active_record_1
3074
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3075
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3076
+  (0.1ms) SAVEPOINT active_record_1
3077
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 119 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
3078
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 119], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3079
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3080
+  (0.1ms) ROLLBACK
3081
+  (0.1ms) BEGIN
3082
+  (0.1ms) SAVEPOINT active_record_1
3083
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3084
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3085
+  (0.1ms) SAVEPOINT active_record_1
3086
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Mw-zVthFgTszyNUlvHIXQg7AE8J9Qrj1JSA-jGTjq8dQ' LIMIT 1
3087
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 120], ["target_type", "User"], ["token", "Mw-zVthFgTszyNUlvHIXQg7AE8J9Qrj1JSA-jGTjq8dQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3088
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3089
+  (0.1ms) SAVEPOINT active_record_1
3090
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3091
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Mw-zVthFgTszyNUlvHIXQg7AE8J9Qrj1JSA-jGTjq8dQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
3092
+  (0.1ms) ROLLBACK
3093
+  (0.1ms) BEGIN
3094
+  (0.1ms) SAVEPOINT active_record_1
3095
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3096
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3097
+  (0.1ms) SAVEPOINT active_record_1
3098
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'a79Q9869ysV9naMCLfQg1AFIiV22fkoHS9S0Mxa1clWg' LIMIT 1
3099
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 121], ["target_type", "User"], ["token", "a79Q9869ysV9naMCLfQg1AFIiV22fkoHS9S0Mxa1clWg"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3100
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3101
+  (0.1ms) SAVEPOINT active_record_1
3102
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3103
+  (0.1ms) SAVEPOINT active_record_1
3104
+ SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 37 [["active", false], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3105
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3106
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'a79Q9869ysV9naMCLfQg1AFIiV22fkoHS9S0Mxa1clWg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
3107
+  (0.2ms) ROLLBACK
3108
+  (0.1ms) BEGIN
3109
+  (0.1ms) SAVEPOINT active_record_1
3110
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3111
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3112
+  (0.1ms) SAVEPOINT active_record_1
3113
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pTzTUQKAvZuaplh2sZpY2gOCQ5YyZKUz3ENcRNrfRE8g' LIMIT 1
3114
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 122], ["target_type", "User"], ["token", "pTzTUQKAvZuaplh2sZpY2gOCQ5YyZKUz3ENcRNrfRE8g"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3115
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3116
+  (0.1ms) SAVEPOINT active_record_1
3117
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3118
+  (0.1ms) SAVEPOINT active_record_1
3119
+ SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 38 [["active", false], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3120
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3121
+  (0.1ms) ROLLBACK
3122
+  (0.1ms) BEGIN
3123
+  (0.1ms) SAVEPOINT active_record_1
3124
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3125
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3126
+  (0.1ms) SAVEPOINT active_record_1
3127
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UdKF3m1VAU3uz9rnSXed0wauEA7C1ZBWrEpPfQkfo8fg' LIMIT 1
3128
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00], ["target_id", 123], ["target_type", "User"], ["token", "UdKF3m1VAU3uz9rnSXed0wauEA7C1ZBWrEpPfQkfo8fg"], ["type", "NewPostNotification"], ["updated_at", Wed, 30 Apr 2014 03:22:31 UTC +00:00]]
3129
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3130
+  (0.1ms) SAVEPOINT active_record_1
3131
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3132
+  (0.2ms) ROLLBACK
3133
+  (0.1ms) BEGIN
3134
+  (0.1ms) ROLLBACK
3135
+  (0.1ms) BEGIN
3136
+  (0.2ms) ROLLBACK
3137
+  (0.1ms) BEGIN
3138
+  (0.2ms) ROLLBACK
3139
+  (0.1ms) BEGIN
3140
+  (0.2ms) ROLLBACK
3141
+  (0.1ms) BEGIN
3142
+  (0.1ms) ROLLBACK
3143
+  (0.1ms) BEGIN
3144
+  (0.1ms) ROLLBACK
3145
+  (0.1ms) BEGIN
3146
+  (0.1ms) ROLLBACK