notify_user 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51eaa1ec07a7204cb6318410ebce0b7255a40a21
4
- data.tar.gz: bacc0721a6d58df15f1411aa48d081fa84718613
3
+ metadata.gz: 750cba2cffccaf3e75e84314398fc19b95fc1aa1
4
+ data.tar.gz: e61be5a81fc70de8d790d1137ad9d0ed92aedb02
5
5
  SHA512:
6
- metadata.gz: 4ab6533c03d62fdfb5500bd3a1857b6c01fcd6eca98bbbf8f9e9286735bdab0c5aaba26e72bc1ff77a328596214a521d46cf67dc75a618fd06f2b507b46187a1
7
- data.tar.gz: fbed9a7684ca2a3734a07e63e1ae622f9bcde248cbd30966dae1890a9a29183a559a96618e7e61f18d0a0a817f8e53d674a6a0e222eefc2368fb7294be907570
6
+ metadata.gz: 0d08d03e8db322585e477613cb3336a194e449ba1cde14acae1ea390b3579c959e989d1b39d6dd71723543ce91cb0d4f6a16b35dab6d28813f75413eee99dd6f
7
+ data.tar.gz: 1d7e8aaf777f0bbb01ef117386e936ff066397d85272204c0c6640761d5a21b6c1eed28a3cd5e1a9ae5c743ee7c2ffac236841d12617eaf5c6cf13e112d1aeaa
@@ -66,7 +66,7 @@ module NotifyUser
66
66
  ActionView::Base.new(
67
67
  Rails.configuration.paths["app/views"]).render(
68
68
  :template => self.class.views[:mobile_sdk][:template_path].call(self), :formats => [:html],
69
- :locals => { :params => self.params}, :layout => false)
69
+ :locals => { :params => self.params}, :layout => false).html_safe
70
70
  end
71
71
 
72
72
  def mobile_message(length=115)
@@ -274,6 +274,7 @@ module NotifyUser
274
274
  end
275
275
 
276
276
  private
277
+
277
278
  def unsubscribed_validation
278
279
  errors.add(:target, (" has unsubscribed from this type")) if user_has_unsubscribed?
279
280
  end
@@ -292,6 +293,5 @@ module NotifyUser
292
293
  return false
293
294
  end
294
295
 
295
-
296
296
  end
297
297
  end
@@ -1,12 +1,14 @@
1
1
  class NotifyUser::NotificationSerializer < ActiveModel::Serializer
2
+ require 'cgi'
2
3
  root :notifications
3
4
 
4
5
  attributes :id, :type, :message, :read, :params, :created_at
5
6
 
6
7
  def message
7
- options[:template_renderer].render_to_string(:template => object.class.views[:mobile_sdk][:template_path].call(object),
8
+ string = options[:template_renderer].render_to_string(:template => object.class.views[:mobile_sdk][:template_path].call(object),
8
9
  :locals => {params: object.params},
9
10
  :layout => false, :formats => [:html])
11
+ return ::CGI.unescapeHTML("#{string}")
10
12
  end
11
13
 
12
14
  def read
@@ -1,3 +1,3 @@
1
1
  module NotifyUser
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.24"
3
3
  end
@@ -28174,3 +28174,2153 @@ o here.
28174
28174
   (0.3ms) ROLLBACK
28175
28175
   (0.2ms) BEGIN
28176
28176
   (0.2ms) ROLLBACK
28177
+  (0.4ms) BEGIN
28178
+  (0.9ms) SAVEPOINT active_record_1
28179
+ SQL (17.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28180
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28181
+ Processing by NotifyUser::NotificationsController#index as HTML
28182
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms)
28183
+ Completed 200 OK in 17ms (Views: 13.1ms | ActiveRecord: 0.0ms)
28184
+  (0.4ms) ROLLBACK
28185
+  (0.2ms) BEGIN
28186
+  (0.2ms) SAVEPOINT active_record_1
28187
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28188
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28189
+  (0.3ms) SAVEPOINT active_record_1
28190
+  (5.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1160 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28191
+ SQL (3.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1160], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28192
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28193
+ Processing by NotifyUser::NotificationsController#index as JSON
28194
+  (0.9ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1160 AND "notify_user_notifications"."target_type" = 'User'
28195
+ NotifyUser::BaseNotification Load (3.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1160 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
28196
+ Completed 200 OK in 26ms (Views: 15.2ms | ActiveRecord: 4.6ms)
28197
+  (0.6ms) ROLLBACK
28198
+  (0.2ms) BEGIN
28199
+  (0.2ms) SAVEPOINT active_record_1
28200
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28201
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28202
+  (0.2ms) SAVEPOINT active_record_1
28203
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1161 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28204
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1161], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28205
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28206
+  (0.3ms) SAVEPOINT active_record_1
28207
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1161 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28208
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1161], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28209
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28210
+  (0.3ms) SAVEPOINT active_record_1
28211
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1161 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28212
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1161], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28213
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28214
+ Processing by NotifyUser::NotificationsController#index as HTML
28215
+ NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1161 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
28216
+ Completed 200 OK in 59ms (Views: 57.5ms | ActiveRecord: 1.0ms)
28217
+  (0.4ms) ROLLBACK
28218
+  (0.2ms) BEGIN
28219
+  (0.3ms) SAVEPOINT active_record_1
28220
+ SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28221
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28222
+  (0.2ms) SAVEPOINT active_record_1
28223
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28224
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1162], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28225
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28226
+  (0.2ms) SAVEPOINT active_record_1
28227
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28228
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1162], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28229
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28230
+  (0.2ms) SAVEPOINT active_record_1
28231
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28232
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1162], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28233
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28234
+ Processing by NotifyUser::NotificationsController#read as HTML
28235
+ Parameters: {"id"=>"1171"}
28236
+ NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1162 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1171') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28237
+  (0.2ms) SAVEPOINT active_record_1
28238
+ User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1162]]
28239
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28240
+ SQL (1.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1171 [["state", "read"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28241
+  (0.4ms) RELEASE SAVEPOINT active_record_1
28242
+ Completed 200 OK in 21ms (Views: 1.9ms | ActiveRecord: 4.6ms)
28243
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1171 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28244
+  (0.3ms) ROLLBACK
28245
+  (0.1ms) BEGIN
28246
+  (0.2ms) SAVEPOINT active_record_1
28247
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28248
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28249
+  (0.2ms) SAVEPOINT active_record_1
28250
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28251
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1163], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28252
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28253
+  (0.2ms) SAVEPOINT active_record_1
28254
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28255
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1163], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28256
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28257
+  (0.2ms) SAVEPOINT active_record_1
28258
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28259
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1163], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28260
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28261
+ Processing by NotifyUser::NotificationsController#read as HTML
28262
+ Parameters: {"id"=>"1174"}
28263
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1163 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1174') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28264
+  (0.2ms) SAVEPOINT active_record_1
28265
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1163]]
28266
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28267
+ 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" = 1174 [["state", "read"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28268
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28269
+ Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 3.0ms)
28270
+ Processing by NotifyUser::NotificationsController#read as HTML
28271
+ Parameters: {"id"=>"1174"}
28272
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1163 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1174') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28273
+ Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 3.8ms)
28274
+  (0.3ms) ROLLBACK
28275
+  (0.2ms) BEGIN
28276
+  (0.2ms) SAVEPOINT active_record_1
28277
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28278
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28279
+  (0.3ms) SAVEPOINT active_record_1
28280
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1164 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28281
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1164], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28282
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28283
+  (0.2ms) SAVEPOINT active_record_1
28284
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1164 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28285
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1164], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28286
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28287
+  (0.2ms) SAVEPOINT active_record_1
28288
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1164 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28289
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1164], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28290
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28291
+ Processing by NotifyUser::NotificationsController#mark_all as HTML
28292
+ SQL (1.4ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1164 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))
28293
+ Redirected to http://test.host/notify_user/notifications
28294
+ Completed 302 Found in 5ms (ActiveRecord: 1.4ms)
28295
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1164 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
28296
+  (0.5ms) ROLLBACK
28297
+  (0.1ms) BEGIN
28298
+  (0.2ms) SAVEPOINT active_record_1
28299
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28300
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28301
+  (0.2ms) SAVEPOINT active_record_1
28302
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1165 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28303
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1165], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28304
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28305
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
28306
+ Parameters: {"ids"=>["1180"]}
28307
+ SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1165 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1180'))
28308
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1165 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1180'))
28309
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 1.2ms)
28310
+ NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1180]]
28311
+  (0.2ms) ROLLBACK
28312
+  (0.3ms) BEGIN
28313
+  (0.2ms) SAVEPOINT active_record_1
28314
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28315
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28316
+  (0.2ms) SAVEPOINT active_record_1
28317
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1166 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28318
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1166], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28319
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28320
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
28321
+ Parameters: {"ids"=>["1181"]}
28322
+ SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1166 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1181'))
28323
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1166 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1181'))
28324
+ Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 1.1ms)
28325
+  (0.3ms) ROLLBACK
28326
+  (0.2ms) BEGIN
28327
+  (0.3ms) SAVEPOINT active_record_1
28328
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28329
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28330
+  (0.2ms) SAVEPOINT active_record_1
28331
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28332
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1167], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28333
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28334
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28335
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
28336
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
28337
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28338
+  (0.4ms) SAVEPOINT active_record_1
28339
+ NotifyUser::Unsubscribe Exists (0.8ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1167) LIMIT 1
28340
+ SQL (2.9ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["target_id", 1167], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28341
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28342
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28343
+ Completed 200 OK in 26ms (Views: 0.5ms | ActiveRecord: 5.4ms)
28344
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1167 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28345
+  (0.2ms) ROLLBACK
28346
+  (0.2ms) BEGIN
28347
+  (0.2ms) SAVEPOINT active_record_1
28348
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28349
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28350
+  (0.2ms) SAVEPOINT active_record_1
28351
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28352
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1168], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28353
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28354
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28355
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
28356
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
28357
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28358
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28359
+ Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.9ms)
28360
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28361
+  (0.2ms) ROLLBACK
28362
+  (0.2ms) BEGIN
28363
+  (0.2ms) SAVEPOINT active_record_1
28364
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28365
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28366
+  (0.2ms) SAVEPOINT active_record_1
28367
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1169 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28368
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1169], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28369
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28370
+ Processing by NotifyUser::NotificationsController#unsubscribe as HTML
28371
+ Parameters: {"type"=>"NewPostNotification"}
28372
+  (0.3ms) SAVEPOINT active_record_1
28373
+ 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" = 1169) LIMIT 1
28374
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["target_id", 1169], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28375
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28376
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
28377
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1169 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28378
+ Completed 302 Found in 7ms (ActiveRecord: 2.2ms)
28379
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
28380
+  (0.4ms) ROLLBACK
28381
+  (0.2ms) BEGIN
28382
+  (0.2ms) SAVEPOINT active_record_1
28383
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28384
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28385
+  (0.2ms) SAVEPOINT active_record_1
28386
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1170 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28387
+ SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1170], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28388
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28389
+  (0.2ms) SAVEPOINT active_record_1
28390
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1170) LIMIT 1
28391
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["target_id", 1170], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28392
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28393
+ Processing by NotifyUser::NotificationsController#subscribe as HTML
28394
+ Parameters: {"type"=>"NewPostNotification"}
28395
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1170 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28396
+  (0.2ms) SAVEPOINT active_record_1
28397
+ SQL (0.7ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 268]]
28398
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28399
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
28400
+ Completed 302 Found in 5ms (ActiveRecord: 1.6ms)
28401
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
28402
+  (0.6ms) ROLLBACK
28403
+  (0.2ms) BEGIN
28404
+  (0.2ms) SAVEPOINT active_record_1
28405
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28406
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28407
+  (0.2ms) SAVEPOINT active_record_1
28408
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1171 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28409
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1171], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28410
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28411
+ NotifyUser::UserHash Load (2.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1171 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28412
+  (0.2ms) SAVEPOINT active_record_1
28413
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DKvRFO6FHHD6JIwyUpklWw2ADTlggIGW7Hak2zw7yurA' LIMIT 1
28414
+ SQL (2.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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["target_id", 1171], ["target_type", "User"], ["token", "DKvRFO6FHHD6JIwyUpklWw2ADTlggIGW7Hak2zw7yurA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28415
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28416
+ Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
28417
+ Parameters: {"type"=>"NewPostNotification", "token"=>"DKvRFO6FHHD6JIwyUpklWw2ADTlggIGW7Hak2zw7yurA"}
28418
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DKvRFO6FHHD6JIwyUpklWw2ADTlggIGW7Hak2zw7yurA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
28419
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DKvRFO6FHHD6JIwyUpklWw2ADTlggIGW7Hak2zw7yurA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28420
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1171]]
28421
+  (0.2ms) SAVEPOINT active_record_1
28422
+ 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" = 1171) LIMIT 1
28423
+ 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", Sat, 15 Nov 2014 10:47:01 UTC +00:00], ["target_id", 1171], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28424
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28425
+  (0.2ms) SAVEPOINT active_record_1
28426
+ SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 324 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:47:01 UTC +00:00]]
28427
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28428
+ Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 4.0ms)
28429
+ 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
28430
+  (0.3ms) ROLLBACK
28431
+  (0.2ms) BEGIN
28432
+ 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
28433
+  (0.2ms) SAVEPOINT active_record_1
28434
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28435
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28436
+  (0.2ms) SAVEPOINT active_record_1
28437
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28438
+  (0.4ms) ROLLBACK
28439
+  (0.3ms) BEGIN
28440
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28441
+  (0.3ms) SAVEPOINT active_record_1
28442
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28443
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28444
+  (0.2ms) SAVEPOINT active_record_1
28445
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28446
+  (0.2ms) ROLLBACK
28447
+  (0.2ms) BEGIN
28448
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28449
+  (0.2ms) SAVEPOINT active_record_1
28450
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28451
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28452
+  (0.2ms) SAVEPOINT active_record_1
28453
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28454
+  (0.2ms) ROLLBACK
28455
+  (0.3ms) BEGIN
28456
+  (0.2ms) SAVEPOINT active_record_1
28457
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28458
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28459
+  (0.2ms) SAVEPOINT active_record_1
28460
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1172 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28461
+ SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1172], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28462
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28463
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1172 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))
28464
+  (0.3ms) ROLLBACK
28465
+  (0.2ms) BEGIN
28466
+  (0.3ms) SAVEPOINT active_record_1
28467
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28468
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28469
+  (0.2ms) SAVEPOINT active_record_1
28470
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1173 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28471
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1173], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28472
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28473
+  (0.2ms) ROLLBACK
28474
+  (0.2ms) BEGIN
28475
+  (0.2ms) SAVEPOINT active_record_1
28476
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28477
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28478
+  (0.2ms) SAVEPOINT active_record_1
28479
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1174 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28480
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1174], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28481
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28482
+  (0.2ms) ROLLBACK
28483
+  (0.2ms) BEGIN
28484
+  (0.3ms) SAVEPOINT active_record_1
28485
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28486
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28487
+  (0.2ms) SAVEPOINT active_record_1
28488
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1175 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28489
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1175], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28490
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28491
+  (0.3ms) SAVEPOINT active_record_1
28492
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1175 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28493
+ SQL (1.0ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1190 [["params", {"listing_id"=>1}], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28494
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28495
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
28496
+  (0.3ms) ROLLBACK
28497
+  (0.2ms) BEGIN
28498
+  (0.3ms) SAVEPOINT active_record_1
28499
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28500
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28501
+  (0.2ms) SAVEPOINT active_record_1
28502
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1176 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28503
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1176], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28504
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28505
+  (0.3ms) SAVEPOINT active_record_1
28506
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1176 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28507
+ SQL (1.1ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1191 [["params", {"listing_id"=>1}], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28508
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28509
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
28510
+  (0.3ms) ROLLBACK
28511
+  (0.2ms) BEGIN
28512
+  (0.3ms) SAVEPOINT active_record_1
28513
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28514
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28515
+  (0.2ms) SAVEPOINT active_record_1
28516
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1177 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28517
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1177], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28518
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28519
+  (0.3ms) SAVEPOINT active_record_1
28520
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1177 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28521
+ SQL (0.9ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1192 [["params", {:listing_id=>1}], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28522
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28523
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
28524
+  (0.3ms) ROLLBACK
28525
+  (0.2ms) BEGIN
28526
+  (0.2ms) SAVEPOINT active_record_1
28527
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28528
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28529
+  (0.2ms) SAVEPOINT active_record_1
28530
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1178 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28531
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1178], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28532
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28533
+  (0.2ms) SAVEPOINT active_record_1
28534
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1178 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28535
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1193 [["params", {:listing_id=>1}], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28536
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28537
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
28538
+  (0.2ms) ROLLBACK
28539
+  (0.2ms) BEGIN
28540
+  (0.2ms) SAVEPOINT active_record_1
28541
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28542
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28543
+  (0.2ms) SAVEPOINT active_record_1
28544
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1179 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28545
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1179], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28546
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28547
+  (0.3ms) SAVEPOINT active_record_1
28548
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28549
+  (0.2ms) ROLLBACK
28550
+  (0.2ms) BEGIN
28551
+  (0.4ms) SAVEPOINT active_record_1
28552
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28553
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28554
+  (0.2ms) SAVEPOINT active_record_1
28555
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28556
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1180], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28557
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28558
+  (0.2ms) SAVEPOINT active_record_1
28559
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28560
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28561
+  (1.2ms) 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" = 1180 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1195)
28562
+ NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1195]]
28563
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1180]]
28564
+ 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" = 1180 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
28565
+  (0.2ms) SAVEPOINT active_record_1
28566
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1180]]
28567
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28568
+ SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1195 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28569
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28570
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1195 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28571
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1180]]
28572
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28573
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1195 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28574
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1180]]
28575
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
28576
+  (0.3ms) ROLLBACK
28577
+  (0.2ms) BEGIN
28578
+  (0.3ms) SAVEPOINT active_record_1
28579
+ SQL (1.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28580
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28581
+  (0.2ms) SAVEPOINT active_record_1
28582
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28583
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1181], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28584
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28585
+  (0.3ms) SAVEPOINT active_record_1
28586
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28587
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28588
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1181 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1196)
28589
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1196]]
28590
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1181]]
28591
+ 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" = 1181 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
28592
+  (0.3ms) SAVEPOINT active_record_1
28593
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1181]]
28594
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28595
+ 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" = 1196 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28596
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28597
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1196 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28598
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1181]]
28599
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28600
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1196 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28601
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1181]]
28602
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
28603
+  (0.2ms) ROLLBACK
28604
+  (0.2ms) BEGIN
28605
+  (0.2ms) SAVEPOINT active_record_1
28606
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28607
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28608
+  (0.2ms) SAVEPOINT active_record_1
28609
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1182 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28610
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1182], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28611
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28612
+  (0.2ms) SAVEPOINT active_record_1
28613
+  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1182 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28614
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28615
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1182 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1197)
28616
+  (0.2ms) SAVEPOINT active_record_1
28617
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1182 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28618
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1182], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28619
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28620
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1182 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1198)
28621
+  (0.3ms) ROLLBACK
28622
+  (0.2ms) BEGIN
28623
+  (0.2ms) SAVEPOINT active_record_1
28624
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28625
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28626
+  (0.3ms) SAVEPOINT active_record_1
28627
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1183 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28628
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1183], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28629
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28630
+  (0.2ms) SAVEPOINT active_record_1
28631
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1183 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28632
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1183], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28633
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28634
+ 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", 1200]]
28635
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1183]]
28636
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1183 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
28637
+  (0.2ms) SAVEPOINT active_record_1
28638
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1183]]
28639
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1183 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28640
+ SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1199 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28641
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28642
+  (0.2ms) SAVEPOINT active_record_1
28643
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1183]]
28644
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1183 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28645
+ 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" = 1200 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28646
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28647
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1183 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28648
+ NotifyUser::UserHash Load (1.0ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1183 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28649
+  (0.3ms) SAVEPOINT active_record_1
28650
+ NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'VLbMJ2kdT89TDP5n9x0BgA3FTnxmwwVSAQXZCi-BlQHw' LIMIT 1
28651
+ SQL (0.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1183], ["target_type", "User"], ["token", "VLbMJ2kdT89TDP5n9x0BgA3FTnxmwwVSAQXZCi-BlQHw"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28652
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28653
+
28654
+ Sent mail to user@example.com (8.8ms)
28655
+ Date: Sat, 15 Nov 2014 21:47:02 +1100
28656
+ From: please-change-me-at-config-initializers-notify-user@example.com
28657
+ To: user@example.com
28658
+ Message-ID: <54672f264bf6a_39a3fe439065bf078399@wp.local.mail>
28659
+ Subject: Rails404: You have new Newpostnotification notifications.
28660
+ Mime-Version: 1.0
28661
+ Content-Type: text/html;
28662
+ charset=UTF-8
28663
+ Content-Transfer-Encoding: quoted-printable
28664
+
28665
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
28666
+ tml4/strict.dtd">
28667
+ <html>
28668
+ <head>
28669
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
28670
+ "/>
28671
+ <title></title>
28672
+ </head>
28673
+
28674
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
28675
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
28676
+ ing: optimizeLegibility;">
28677
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
28678
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
28679
+ Logo
28680
+ </div>
28681
+ </div>
28682
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
28683
+ ">
28684
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
28685
+ =
28686
+
28687
+ <div>
28688
+ New Post Notification happened. =
28689
+
28690
+ </div>
28691
+ <div>
28692
+ New Post Notification happened. =
28693
+
28694
+ </div>
28695
+
28696
+ </div>
28697
+ </div>
28698
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
28699
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
28700
+ <p style=3D"text-align: center;">
28701
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
28702
+ _unsubscribe?token=3DVLbMJ2kdT89TDP5n9x0BgA3FTnxmwwVSAQXZCi-BlQHw&amp;typ=
28703
+ e=3DNewPostNotification">Unsubscribe</a>
28704
+ </p>
28705
+ <p style=3D"text-align: center;">
28706
+ This is the default generated layout. A privacy declaration could g=
28707
+ o here.
28708
+ </p>
28709
+ <p style=3D"text-align: center; margin-bottom: 0px;">
28710
+ =C2=A9 MyCompany Pty Ltd
28711
+ </p>
28712
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
28713
+ ABN 123 456 789
28714
+ </p>
28715
+ </div>
28716
+ </div>
28717
+ </body>
28718
+ </html>=
28719
+
28720
+  (0.3ms) ROLLBACK
28721
+  (0.2ms) BEGIN
28722
+  (0.2ms) SAVEPOINT active_record_1
28723
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28724
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28725
+  (0.2ms) SAVEPOINT active_record_1
28726
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1184 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28727
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1184], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28728
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28729
+ 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", 1201]]
28730
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1184]]
28731
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1184 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
28732
+  (0.2ms) SAVEPOINT active_record_1
28733
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1184]]
28734
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1184 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28735
+ 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" = 1201 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28736
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28737
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1201 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28738
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1184]]
28739
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1184 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28740
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1184 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28741
+  (0.2ms) SAVEPOINT active_record_1
28742
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dugIiDCI4ZQ_eZcxvnKBkAxVeYtlNxE37dlemwCqTX-Q' LIMIT 1
28743
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1184], ["target_type", "User"], ["token", "dugIiDCI4ZQ_eZcxvnKBkAxVeYtlNxE37dlemwCqTX-Q"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28744
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28745
+
28746
+ Sent mail to user@example.com (6.2ms)
28747
+ Date: Sat, 15 Nov 2014 21:47:02 +1100
28748
+ From: please-change-me-at-config-initializers-notify-user@example.com
28749
+ To: user@example.com
28750
+ Message-ID: <54672f26563d3_39a3fe439065bf0784b3@wp.local.mail>
28751
+ Subject: Rails404: You have a new Newpostnotification notification.
28752
+ Mime-Version: 1.0
28753
+ Content-Type: text/html;
28754
+ charset=UTF-8
28755
+ Content-Transfer-Encoding: quoted-printable
28756
+
28757
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
28758
+ tml4/strict.dtd">
28759
+ <html>
28760
+ <head>
28761
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
28762
+ "/>
28763
+ <title></title>
28764
+ </head>
28765
+
28766
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
28767
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
28768
+ ing: optimizeLegibility;">
28769
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
28770
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
28771
+ Logo
28772
+ </div>
28773
+ </div>
28774
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
28775
+ ">
28776
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
28777
+ New Post Notification happened.
28778
+
28779
+ </div>
28780
+ </div>
28781
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
28782
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
28783
+ <p style=3D"text-align: center;">
28784
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
28785
+ _unsubscribe?token=3DdugIiDCI4ZQ_eZcxvnKBkAxVeYtlNxE37dlemwCqTX-Q&amp;typ=
28786
+ e=3DNewPostNotification">Unsubscribe</a>
28787
+ </p>
28788
+ <p style=3D"text-align: center;">
28789
+ This is the default generated layout. A privacy declaration could g=
28790
+ o here.
28791
+ </p>
28792
+ <p style=3D"text-align: center; margin-bottom: 0px;">
28793
+ =C2=A9 MyCompany Pty Ltd
28794
+ </p>
28795
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
28796
+ ABN 123 456 789
28797
+ </p>
28798
+ </div>
28799
+ </div>
28800
+ </body>
28801
+ </html>=
28802
+
28803
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1184 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
28804
+  (0.3ms) ROLLBACK
28805
+  (0.2ms) BEGIN
28806
+  (0.3ms) SAVEPOINT active_record_1
28807
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28808
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28809
+  (0.2ms) SAVEPOINT active_record_1
28810
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1185) LIMIT 1
28811
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1185], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28812
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28813
+  (0.2ms) SAVEPOINT active_record_1
28814
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1185 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28815
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
28816
+ 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
28817
+  (0.2ms) ROLLBACK
28818
+  (0.2ms) BEGIN
28819
+  (0.2ms) SAVEPOINT active_record_1
28820
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28821
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28822
+  (0.2ms) SAVEPOINT active_record_1
28823
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28824
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1186], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28825
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28826
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1202 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28827
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1186]]
28828
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1186 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28829
+  (0.3ms) ROLLBACK
28830
+  (0.2ms) BEGIN
28831
+  (0.2ms) SAVEPOINT active_record_1
28832
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28833
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28834
+  (0.2ms) SAVEPOINT active_record_1
28835
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28836
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1187], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28837
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28838
+  (0.2ms) SAVEPOINT active_record_1
28839
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28840
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1187], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28841
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28842
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1204]]
28843
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1187]]
28844
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1187 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
28845
+  (0.2ms) SAVEPOINT active_record_1
28846
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1187]]
28847
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28848
+ 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" = 1203 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28849
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28850
+  (0.2ms) SAVEPOINT active_record_1
28851
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1187]]
28852
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28853
+ 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" = 1204 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28854
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28855
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1187 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28856
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1187 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28857
+  (0.3ms) SAVEPOINT active_record_1
28858
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HXFTxLufUkWdCewTIC1uegXW9nY9mXq61OBzn3nd0yEQ' LIMIT 1
28859
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1187], ["target_type", "User"], ["token", "HXFTxLufUkWdCewTIC1uegXW9nY9mXq61OBzn3nd0yEQ"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28860
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28861
+
28862
+ Sent mail to user@example.com (6.6ms)
28863
+ Date: Sat, 15 Nov 2014 21:47:02 +1100
28864
+ From: please-change-me-at-config-initializers-notify-user@example.com
28865
+ To: user@example.com
28866
+ Message-ID: <54672f2669903_39a3fe439065bf0785ce@wp.local.mail>
28867
+ Subject: Rails404: You have new Newpostnotification notifications.
28868
+ Mime-Version: 1.0
28869
+ Content-Type: text/html;
28870
+ charset=UTF-8
28871
+ Content-Transfer-Encoding: quoted-printable
28872
+
28873
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
28874
+ tml4/strict.dtd">
28875
+ <html>
28876
+ <head>
28877
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
28878
+ "/>
28879
+ <title></title>
28880
+ </head>
28881
+
28882
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
28883
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
28884
+ ing: optimizeLegibility;">
28885
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
28886
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
28887
+ Logo
28888
+ </div>
28889
+ </div>
28890
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
28891
+ ">
28892
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
28893
+ =
28894
+
28895
+ <div>
28896
+ New Post Notification happened. =
28897
+
28898
+ </div>
28899
+ <div>
28900
+ New Post Notification happened. =
28901
+
28902
+ </div>
28903
+
28904
+ </div>
28905
+ </div>
28906
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
28907
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
28908
+ <p style=3D"text-align: center;">
28909
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
28910
+ _unsubscribe?token=3DHXFTxLufUkWdCewTIC1uegXW9nY9mXq61OBzn3nd0yEQ&amp;typ=
28911
+ e=3DNewPostNotification">Unsubscribe</a>
28912
+ </p>
28913
+ <p style=3D"text-align: center;">
28914
+ This is the default generated layout. A privacy declaration could g=
28915
+ o here.
28916
+ </p>
28917
+ <p style=3D"text-align: center; margin-bottom: 0px;">
28918
+ =C2=A9 MyCompany Pty Ltd
28919
+ </p>
28920
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
28921
+ ABN 123 456 789
28922
+ </p>
28923
+ </div>
28924
+ </div>
28925
+ </body>
28926
+ </html>=
28927
+
28928
+  (0.4ms) ROLLBACK
28929
+  (0.2ms) BEGIN
28930
+  (0.2ms) SAVEPOINT active_record_1
28931
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28932
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28933
+  (0.2ms) SAVEPOINT active_record_1
28934
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1188 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28935
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1188], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28936
+  (0.3ms) RELEASE SAVEPOINT active_record_1
28937
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1205]]
28938
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1188]]
28939
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1188 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
28940
+  (0.2ms) SAVEPOINT active_record_1
28941
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1188]]
28942
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1188 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
28943
+ 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" = 1205 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28944
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28945
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1205 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
28946
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1188]]
28947
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1188 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
28948
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1188 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
28949
+  (0.2ms) SAVEPOINT active_record_1
28950
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3Y_EE-sr9OXYkQBMNPrZUAd_HeLg35wXg_PYX-xGzxNg' LIMIT 1
28951
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1188], ["target_type", "User"], ["token", "3Y_EE-sr9OXYkQBMNPrZUAd_HeLg35wXg_PYX-xGzxNg"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
28952
+  (0.2ms) RELEASE SAVEPOINT active_record_1
28953
+
28954
+ Sent mail to user@example.com (7.3ms)
28955
+ Date: Sat, 15 Nov 2014 21:47:02 +1100
28956
+ From: please-change-me-at-config-initializers-notify-user@example.com
28957
+ To: user@example.com
28958
+ Message-ID: <54672f26746d5_39a3fe439065bf0786d2@wp.local.mail>
28959
+ Subject: Rails404: You have a new Newpostnotification notification.
28960
+ Mime-Version: 1.0
28961
+ Content-Type: text/html;
28962
+ charset=UTF-8
28963
+ Content-Transfer-Encoding: quoted-printable
28964
+
28965
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
28966
+ tml4/strict.dtd">
28967
+ <html>
28968
+ <head>
28969
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
28970
+ "/>
28971
+ <title></title>
28972
+ </head>
28973
+
28974
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
28975
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
28976
+ ing: optimizeLegibility;">
28977
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
28978
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
28979
+ Logo
28980
+ </div>
28981
+ </div>
28982
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
28983
+ ">
28984
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
28985
+ New Post Notification happened.
28986
+
28987
+ </div>
28988
+ </div>
28989
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
28990
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
28991
+ <p style=3D"text-align: center;">
28992
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
28993
+ _unsubscribe?token=3D3Y_EE-sr9OXYkQBMNPrZUAd_HeLg35wXg_PYX-xGzxNg&amp;typ=
28994
+ e=3DNewPostNotification">Unsubscribe</a>
28995
+ </p>
28996
+ <p style=3D"text-align: center;">
28997
+ This is the default generated layout. A privacy declaration could g=
28998
+ o here.
28999
+ </p>
29000
+ <p style=3D"text-align: center; margin-bottom: 0px;">
29001
+ =C2=A9 MyCompany Pty Ltd
29002
+ </p>
29003
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
29004
+ ABN 123 456 789
29005
+ </p>
29006
+ </div>
29007
+ </div>
29008
+ </body>
29009
+ </html>=
29010
+
29011
+  (0.4ms) ROLLBACK
29012
+  (0.2ms) BEGIN
29013
+  (0.4ms) SAVEPOINT active_record_1
29014
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29015
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29016
+  (0.2ms) SAVEPOINT active_record_1
29017
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29018
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1189], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29019
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29020
+  (0.2ms) SAVEPOINT active_record_1
29021
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29022
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29023
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29024
+  (0.2ms) SAVEPOINT active_record_1
29025
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29026
+ 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" = 1206 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29027
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29028
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1206 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29029
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1189]]
29030
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29031
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
29032
+  (0.2ms) ROLLBACK
29033
+  (0.1ms) BEGIN
29034
+  (0.2ms) SAVEPOINT active_record_1
29035
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29036
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29037
+  (0.2ms) SAVEPOINT active_record_1
29038
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1190) LIMIT 1
29039
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1190], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29040
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29041
+  (0.2ms) SAVEPOINT active_record_1
29042
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1190 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29043
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29044
+  (0.2ms) SAVEPOINT active_record_1
29045
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1190 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29046
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29047
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1190 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29048
+  (0.2ms) ROLLBACK
29049
+  (0.2ms) BEGIN
29050
+  (0.2ms) SAVEPOINT active_record_1
29051
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29052
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29053
+  (0.2ms) SAVEPOINT active_record_1
29054
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1191) LIMIT 1
29055
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1191], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29056
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29057
+  (0.2ms) SAVEPOINT active_record_1
29058
+ NotifyUser::Unsubscribe Exists (0.8ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 272 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1191) LIMIT 1
29059
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29060
+  (0.2ms) SAVEPOINT active_record_1
29061
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29062
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1191], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29063
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29064
+  (0.2ms) SAVEPOINT active_record_1
29065
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29066
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29067
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29068
+  (0.2ms) SAVEPOINT active_record_1
29069
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29070
+ SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1207 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29071
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29072
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1207 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29073
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1191]]
29074
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29075
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
29076
+  (0.2ms) ROLLBACK
29077
+  (0.2ms) BEGIN
29078
+  (0.2ms) SAVEPOINT active_record_1
29079
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29080
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29081
+  (0.2ms) SAVEPOINT active_record_1
29082
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1192 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29083
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1192], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29084
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29085
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1192 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29086
+  (0.2ms) SAVEPOINT active_record_1
29087
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DjO7VXBwUnyBPPa0KzfT6Qh8uwCbKClIQGq6Ci2SogGg' LIMIT 1
29088
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1192], ["target_type", "User"], ["token", "DjO7VXBwUnyBPPa0KzfT6Qh8uwCbKClIQGq6Ci2SogGg"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29089
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29090
+  (0.2ms) ROLLBACK
29091
+  (0.2ms) BEGIN
29092
+  (0.2ms) SAVEPOINT active_record_1
29093
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29094
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29095
+  (0.2ms) SAVEPOINT active_record_1
29096
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1193 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29097
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1193], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29098
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29099
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1193 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29100
+  (0.2ms) SAVEPOINT active_record_1
29101
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WMWmFq6t8Am8RxnubJFpBQW8sF-wmsgantH0JsOEsBSA' LIMIT 1
29102
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1193], ["target_type", "User"], ["token", "WMWmFq6t8Am8RxnubJFpBQW8sF-wmsgantH0JsOEsBSA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29103
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29104
+ NotifyUser::UserHash Load (301.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1193 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29105
+  (0.4ms) ROLLBACK
29106
+  (0.2ms) BEGIN
29107
+  (0.4ms) SAVEPOINT active_record_1
29108
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29109
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29110
+  (0.3ms) SAVEPOINT active_record_1
29111
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1194 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29112
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1194], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29113
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29114
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1194 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29115
+  (0.3ms) SAVEPOINT active_record_1
29116
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rtG9pLgeik7JsbbJky09GwmCVPTWZY2E-UjeYlug1PaQ' LIMIT 1
29117
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1194], ["target_type", "User"], ["token", "rtG9pLgeik7JsbbJky09GwmCVPTWZY2E-UjeYlug1PaQ"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29118
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29119
+  (0.2ms) SAVEPOINT active_record_1
29120
+ SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 331 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29121
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29122
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1194 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29123
+  (0.2ms) SAVEPOINT active_record_1
29124
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '0Ao3jLLC_rvE7vqcRWu_qwNWy-e6yqV91kUe2lyJH_iQ' LIMIT 1
29125
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1194], ["target_type", "User"], ["token", "0Ao3jLLC_rvE7vqcRWu_qwNWy-e6yqV91kUe2lyJH_iQ"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29126
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29127
+  (0.2ms) ROLLBACK
29128
+  (0.2ms) BEGIN
29129
+  (0.2ms) SAVEPOINT active_record_1
29130
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29131
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29132
+  (0.3ms) SAVEPOINT active_record_1
29133
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1195) LIMIT 1
29134
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1195], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29135
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29136
+  (0.3ms) SAVEPOINT active_record_1
29137
+ NotifyUser::Unsubscribe Exists (0.7ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 273 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1195) LIMIT 1
29138
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29139
+  (0.2ms) SAVEPOINT active_record_1
29140
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1195 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29141
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29142
+  (0.2ms) ROLLBACK
29143
+  (0.2ms) BEGIN
29144
+  (0.3ms) SAVEPOINT active_record_1
29145
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29146
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29147
+  (0.4ms) SAVEPOINT active_record_1
29148
+ 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" = 1196) LIMIT 1
29149
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1196], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29150
+  (0.4ms) RELEASE SAVEPOINT active_record_1
29151
+  (0.2ms) SAVEPOINT active_record_1
29152
+ NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 274 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1196) LIMIT 1
29153
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29154
+  (0.2ms) SAVEPOINT active_record_1
29155
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1196 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29156
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29157
+  (0.3ms) ROLLBACK
29158
+  (0.3ms) BEGIN
29159
+  (0.2ms) SAVEPOINT active_record_1
29160
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29161
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29162
+  (0.2ms) SAVEPOINT active_record_1
29163
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1197) LIMIT 1
29164
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1197], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29165
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29166
+  (0.2ms) SAVEPOINT active_record_1
29167
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 275 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1197) LIMIT 1
29168
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29169
+  (0.2ms) SAVEPOINT active_record_1
29170
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1197) LIMIT 1
29171
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29172
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1197 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29173
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1197 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29174
+  (0.2ms) SAVEPOINT active_record_1
29175
+ SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 275]]
29176
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29177
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1197 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29178
+  (1.0ms) ROLLBACK
29179
+  (0.2ms) BEGIN
29180
+  (0.1ms) SAVEPOINT active_record_1
29181
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29182
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29183
+  (0.2ms) SAVEPOINT active_record_1
29184
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1198 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29185
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1198], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29186
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29187
+  (0.3ms) ROLLBACK
29188
+  (0.3ms) BEGIN
29189
+  (0.2ms) SAVEPOINT active_record_1
29190
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29191
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29192
+  (0.2ms) SAVEPOINT active_record_1
29193
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-puxPxAp72Cy4jigsa5zPQRa-JMDWajTSRdd88iLbTsw' LIMIT 1
29194
+ 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", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1199], ["target_type", "User"], ["token", "-puxPxAp72Cy4jigsa5zPQRa-JMDWajTSRdd88iLbTsw"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29195
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29196
+  (0.3ms) SAVEPOINT active_record_1
29197
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29198
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-puxPxAp72Cy4jigsa5zPQRa-JMDWajTSRdd88iLbTsw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
29199
+  (0.2ms) ROLLBACK
29200
+  (0.2ms) BEGIN
29201
+  (0.2ms) SAVEPOINT active_record_1
29202
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29203
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29204
+  (0.2ms) SAVEPOINT active_record_1
29205
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5fCeppigtPQt3LQEPfIeAwernZR5_gpIZ0Mv9PGWliRg' LIMIT 1
29206
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00], ["target_id", 1200], ["target_type", "User"], ["token", "5fCeppigtPQt3LQEPfIeAwernZR5_gpIZ0Mv9PGWliRg"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29207
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29208
+  (0.3ms) SAVEPOINT active_record_1
29209
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29210
+  (0.2ms) SAVEPOINT active_record_1
29211
+ SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 334 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:47:02 UTC +00:00]]
29212
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29213
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5fCeppigtPQt3LQEPfIeAwernZR5_gpIZ0Mv9PGWliRg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
29214
+  (0.3ms) ROLLBACK
29215
+  (0.2ms) BEGIN
29216
+  (0.3ms) SAVEPOINT active_record_1
29217
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00]]
29218
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29219
+  (0.2ms) SAVEPOINT active_record_1
29220
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '848IRbqzTWkVR79QkDZDVQPbUJ36Ef28tCQ0LhZ4-R5w' LIMIT 1
29221
+ 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", Sat, 15 Nov 2014 10:47:03 UTC +00:00], ["target_id", 1201], ["target_type", "User"], ["token", "848IRbqzTWkVR79QkDZDVQPbUJ36Ef28tCQ0LhZ4-R5w"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00]]
29222
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29223
+  (0.2ms) SAVEPOINT active_record_1
29224
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29225
+  (0.2ms) SAVEPOINT active_record_1
29226
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 335 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00]]
29227
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29228
+  (0.2ms) ROLLBACK
29229
+  (0.2ms) BEGIN
29230
+  (0.2ms) SAVEPOINT active_record_1
29231
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00]]
29232
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29233
+  (0.2ms) SAVEPOINT active_record_1
29234
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4rmn8p79fcHmeAXfBVLpsQvUT0CmJdAVV0byaqu_1UBw' LIMIT 1
29235
+ 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", Sat, 15 Nov 2014 10:47:03 UTC +00:00], ["target_id", 1202], ["target_type", "User"], ["token", "4rmn8p79fcHmeAXfBVLpsQvUT0CmJdAVV0byaqu_1UBw"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:47:03 UTC +00:00]]
29236
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29237
+  (0.2ms) SAVEPOINT active_record_1
29238
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29239
+  (0.2ms) ROLLBACK
29240
+  (0.2ms) BEGIN
29241
+  (0.1ms) ROLLBACK
29242
+  (0.1ms) BEGIN
29243
+  (0.2ms) ROLLBACK
29244
+  (0.1ms) BEGIN
29245
+  (0.1ms) ROLLBACK
29246
+  (0.1ms) BEGIN
29247
+  (0.3ms) ROLLBACK
29248
+  (0.2ms) BEGIN
29249
+  (0.2ms) ROLLBACK
29250
+  (0.2ms) BEGIN
29251
+  (0.2ms) ROLLBACK
29252
+  (0.2ms) BEGIN
29253
+  (0.2ms) ROLLBACK
29254
+  (0.2ms) BEGIN
29255
+  (0.4ms) SAVEPOINT active_record_1
29256
+ SQL (3.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29257
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29258
+ Processing by NotifyUser::NotificationsController#index as HTML
29259
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms)
29260
+ Completed 200 OK in 10ms (Views: 7.4ms | ActiveRecord: 0.0ms)
29261
+  (0.4ms) ROLLBACK
29262
+  (0.2ms) BEGIN
29263
+  (0.2ms) SAVEPOINT active_record_1
29264
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29265
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29266
+  (0.4ms) SAVEPOINT active_record_1
29267
+  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1204 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29268
+ SQL (1.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1204], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29269
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29270
+ Processing by NotifyUser::NotificationsController#index as JSON
29271
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1204 AND "notify_user_notifications"."target_type" = 'User'
29272
+ NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1204 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
29273
+ Completed 200 OK in 15ms (Views: 8.1ms | ActiveRecord: 1.7ms)
29274
+  (0.4ms) ROLLBACK
29275
+  (0.2ms) BEGIN
29276
+  (0.2ms) SAVEPOINT active_record_1
29277
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29278
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29279
+  (0.2ms) SAVEPOINT active_record_1
29280
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1205 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29281
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1205], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29282
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29283
+  (0.2ms) SAVEPOINT active_record_1
29284
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1205 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29285
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1205], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29286
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29287
+  (0.2ms) SAVEPOINT active_record_1
29288
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1205 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29289
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1205], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29290
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29291
+ Processing by NotifyUser::NotificationsController#index as HTML
29292
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1205 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
29293
+ Completed 200 OK in 25ms (Views: 23.5ms | ActiveRecord: 0.6ms)
29294
+  (0.3ms) ROLLBACK
29295
+  (0.2ms) BEGIN
29296
+  (0.2ms) SAVEPOINT active_record_1
29297
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29298
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29299
+  (0.2ms) SAVEPOINT active_record_1
29300
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29301
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1206], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29302
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29303
+  (0.2ms) SAVEPOINT active_record_1
29304
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29305
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1206], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29306
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29307
+  (0.2ms) SAVEPOINT active_record_1
29308
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29309
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1206], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29310
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29311
+ Processing by NotifyUser::NotificationsController#read as HTML
29312
+ Parameters: {"id"=>"1216"}
29313
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1206 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1216') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29314
+  (0.2ms) SAVEPOINT active_record_1
29315
+ User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1206]]
29316
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1206 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29317
+ SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1216 [["state", "read"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29318
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29319
+ Completed 200 OK in 16ms (Views: 1.5ms | ActiveRecord: 3.5ms)
29320
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1216 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29321
+  (0.2ms) ROLLBACK
29322
+  (0.2ms) BEGIN
29323
+  (0.2ms) SAVEPOINT active_record_1
29324
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29325
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29326
+  (0.2ms) SAVEPOINT active_record_1
29327
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29328
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1207], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29329
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29330
+  (0.3ms) SAVEPOINT active_record_1
29331
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29332
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1207], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29333
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29334
+  (0.2ms) SAVEPOINT active_record_1
29335
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29336
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1207], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29337
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29338
+ Processing by NotifyUser::NotificationsController#read as HTML
29339
+ Parameters: {"id"=>"1219"}
29340
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1207 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1219') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29341
+  (0.2ms) SAVEPOINT active_record_1
29342
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1207]]
29343
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1207 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29344
+ 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" = 1219 [["state", "read"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29345
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29346
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 2.9ms)
29347
+ Processing by NotifyUser::NotificationsController#read as HTML
29348
+ Parameters: {"id"=>"1219"}
29349
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1207 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1219') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29350
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.4ms)
29351
+  (0.3ms) ROLLBACK
29352
+  (0.2ms) BEGIN
29353
+  (0.2ms) SAVEPOINT active_record_1
29354
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29355
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29356
+  (0.2ms) SAVEPOINT active_record_1
29357
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1208 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29358
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1208], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29359
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29360
+  (0.3ms) SAVEPOINT active_record_1
29361
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1208 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29362
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1208], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29363
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29364
+  (0.2ms) SAVEPOINT active_record_1
29365
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1208 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29366
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1208], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29367
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29368
+ Processing by NotifyUser::NotificationsController#mark_all as HTML
29369
+ SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1208 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))
29370
+ Redirected to http://test.host/notify_user/notifications
29371
+ Completed 302 Found in 2ms (ActiveRecord: 0.9ms)
29372
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1208 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
29373
+  (0.2ms) ROLLBACK
29374
+  (0.2ms) BEGIN
29375
+  (0.2ms) SAVEPOINT active_record_1
29376
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29377
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29378
+  (0.2ms) SAVEPOINT active_record_1
29379
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1209 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29380
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1209], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29381
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29382
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
29383
+ Parameters: {"ids"=>["1225"]}
29384
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1209 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1225'))
29385
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1209 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1225'))
29386
+ Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 1.1ms)
29387
+ NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1225]]
29388
+  (0.2ms) ROLLBACK
29389
+  (0.2ms) BEGIN
29390
+  (0.2ms) SAVEPOINT active_record_1
29391
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29392
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29393
+  (0.2ms) SAVEPOINT active_record_1
29394
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1210 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29395
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1210], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29396
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29397
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
29398
+ Parameters: {"ids"=>["1226"]}
29399
+ SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1210 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1226'))
29400
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1210 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1226'))
29401
+ Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 1.0ms)
29402
+  (0.2ms) ROLLBACK
29403
+  (0.2ms) BEGIN
29404
+  (0.3ms) SAVEPOINT active_record_1
29405
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29406
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29407
+  (0.2ms) SAVEPOINT active_record_1
29408
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29409
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1211], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29410
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29411
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29412
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
29413
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
29414
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29415
+  (0.2ms) SAVEPOINT active_record_1
29416
+ 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" = 1211) LIMIT 1
29417
+ SQL (1.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["target_id", 1211], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29418
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29419
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29420
+ Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 3.3ms)
29421
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29422
+  (0.2ms) ROLLBACK
29423
+  (0.2ms) BEGIN
29424
+  (0.2ms) SAVEPOINT active_record_1
29425
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29426
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29427
+  (0.2ms) SAVEPOINT active_record_1
29428
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1212 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29429
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1212], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29430
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29431
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1212 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29432
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
29433
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
29434
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1212 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29435
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1212 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29436
+ Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.9ms)
29437
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1212 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29438
+  (0.3ms) ROLLBACK
29439
+  (0.2ms) BEGIN
29440
+  (0.2ms) SAVEPOINT active_record_1
29441
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29442
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29443
+  (0.2ms) SAVEPOINT active_record_1
29444
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1213 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29445
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1213], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29446
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29447
+ Processing by NotifyUser::NotificationsController#unsubscribe as HTML
29448
+ Parameters: {"type"=>"NewPostNotification"}
29449
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
29450
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1213 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29451
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
29452
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
29453
+  (0.3ms) ROLLBACK
29454
+  (0.2ms) BEGIN
29455
+  (0.2ms) SAVEPOINT active_record_1
29456
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29457
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29458
+  (0.3ms) SAVEPOINT active_record_1
29459
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1214 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29460
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1214], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29461
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29462
+  (0.2ms) SAVEPOINT active_record_1
29463
+ 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" = 1214) LIMIT 1
29464
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["target_id", 1214], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29465
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29466
+ Processing by NotifyUser::NotificationsController#subscribe as HTML
29467
+ Parameters: {"type"=>"NewPostNotification"}
29468
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1214 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29469
+  (0.2ms) SAVEPOINT active_record_1
29470
+ SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 277]]
29471
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29472
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
29473
+ Completed 302 Found in 4ms (ActiveRecord: 1.5ms)
29474
+ NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
29475
+  (0.2ms) ROLLBACK
29476
+  (0.2ms) BEGIN
29477
+  (0.2ms) SAVEPOINT active_record_1
29478
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29479
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29480
+  (0.2ms) SAVEPOINT active_record_1
29481
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1215 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29482
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1215], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29483
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29484
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1215 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29485
+  (0.2ms) SAVEPOINT active_record_1
29486
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iJPgeTqW-ybs-wLitBpaKQXI8jpfFcoJfTnxmy_MP-EQ' LIMIT 1
29487
+ SQL (0.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["target_id", 1215], ["target_type", "User"], ["token", "iJPgeTqW-ybs-wLitBpaKQXI8jpfFcoJfTnxmy_MP-EQ"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29488
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29489
+ Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
29490
+ Parameters: {"type"=>"NewPostNotification", "token"=>"iJPgeTqW-ybs-wLitBpaKQXI8jpfFcoJfTnxmy_MP-EQ"}
29491
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iJPgeTqW-ybs-wLitBpaKQXI8jpfFcoJfTnxmy_MP-EQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
29492
+ NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iJPgeTqW-ybs-wLitBpaKQXI8jpfFcoJfTnxmy_MP-EQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29493
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1215]]
29494
+  (0.2ms) SAVEPOINT active_record_1
29495
+ 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" = 1215) LIMIT 1
29496
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["target_id", 1215], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29497
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29498
+  (0.2ms) SAVEPOINT active_record_1
29499
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 337 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29500
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29501
+ Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 3.8ms)
29502
+ 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
29503
+  (0.2ms) ROLLBACK
29504
+  (0.2ms) BEGIN
29505
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29506
+  (0.2ms) SAVEPOINT active_record_1
29507
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
29508
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29509
+  (0.2ms) SAVEPOINT active_record_1
29510
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
29511
+  (0.3ms) ROLLBACK
29512
+  (0.2ms) BEGIN
29513
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29514
+  (0.2ms) SAVEPOINT active_record_1
29515
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29516
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29517
+  (0.2ms) SAVEPOINT active_record_1
29518
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29519
+  (0.2ms) ROLLBACK
29520
+  (0.2ms) BEGIN
29521
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29522
+  (0.2ms) SAVEPOINT active_record_1
29523
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29524
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29525
+  (0.2ms) SAVEPOINT active_record_1
29526
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29527
+  (0.3ms) ROLLBACK
29528
+  (0.2ms) BEGIN
29529
+  (0.2ms) SAVEPOINT active_record_1
29530
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29531
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29532
+  (0.2ms) SAVEPOINT active_record_1
29533
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1216 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29534
+ SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["state", "pending"], ["target_id", 1216], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29535
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29536
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1216 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))
29537
+  (0.2ms) ROLLBACK
29538
+  (0.2ms) BEGIN
29539
+  (0.2ms) SAVEPOINT active_record_1
29540
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29541
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29542
+  (0.2ms) SAVEPOINT active_record_1
29543
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1217 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29544
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["state", "pending"], ["target_id", 1217], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29545
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29546
+  (0.2ms) ROLLBACK
29547
+  (0.2ms) BEGIN
29548
+  (0.2ms) SAVEPOINT active_record_1
29549
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29550
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29551
+  (0.2ms) SAVEPOINT active_record_1
29552
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1218 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29553
+ 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", Sat, 15 Nov 2014 10:50:04 UTC +00:00], ["state", "pending"], ["target_id", 1218], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:04 UTC +00:00]]
29554
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29555
+  (0.2ms) ROLLBACK
29556
+  (0.2ms) BEGIN
29557
+  (0.2ms) SAVEPOINT active_record_1
29558
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29559
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29560
+  (0.2ms) SAVEPOINT active_record_1
29561
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1219 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29562
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1219], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29563
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29564
+  (0.1ms) SAVEPOINT active_record_1
29565
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1219 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29566
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1235 [["params", {"listing_id"=>1}], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29567
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29568
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
29569
+  (0.4ms) ROLLBACK
29570
+  (0.2ms) BEGIN
29571
+  (0.2ms) SAVEPOINT active_record_1
29572
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29573
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29574
+  (0.2ms) SAVEPOINT active_record_1
29575
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1220 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29576
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1220], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29577
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29578
+  (0.2ms) SAVEPOINT active_record_1
29579
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1220 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29580
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1236 [["params", {"listing_id"=>1}], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29581
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29582
+ NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
29583
+  (0.2ms) ROLLBACK
29584
+  (0.2ms) BEGIN
29585
+  (0.2ms) SAVEPOINT active_record_1
29586
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29587
+  (0.1ms) RELEASE SAVEPOINT active_record_1
29588
+  (0.1ms) SAVEPOINT active_record_1
29589
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1221 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29590
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1221], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29591
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29592
+  (0.2ms) SAVEPOINT active_record_1
29593
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1221 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29594
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1237 [["params", {:listing_id=>1}], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29595
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29596
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
29597
+  (0.3ms) ROLLBACK
29598
+  (0.2ms) BEGIN
29599
+  (0.2ms) SAVEPOINT active_record_1
29600
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29601
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29602
+  (0.2ms) SAVEPOINT active_record_1
29603
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1222 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29604
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1222], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29605
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29606
+  (0.2ms) SAVEPOINT active_record_1
29607
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1222 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29608
+ SQL (0.9ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1238 [["params", {:listing_id=>1}], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29609
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29610
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
29611
+  (0.2ms) ROLLBACK
29612
+  (0.2ms) BEGIN
29613
+  (0.2ms) SAVEPOINT active_record_1
29614
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29615
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29616
+  (0.1ms) SAVEPOINT active_record_1
29617
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1223 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29618
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1223], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29619
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29620
+  (0.2ms) SAVEPOINT active_record_1
29621
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29622
+  (0.2ms) ROLLBACK
29623
+  (0.2ms) BEGIN
29624
+  (0.2ms) SAVEPOINT active_record_1
29625
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29626
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29627
+  (0.2ms) SAVEPOINT active_record_1
29628
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29629
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1224], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29630
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29631
+  (0.2ms) SAVEPOINT active_record_1
29632
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29633
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29634
+  (0.7ms) 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" = 1224 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1240)
29635
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1240]]
29636
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1224]]
29637
+ 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" = 1224 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
29638
+  (0.2ms) SAVEPOINT active_record_1
29639
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1224]]
29640
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29641
+ 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" = 1240 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29642
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29643
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1240 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29644
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1224]]
29645
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29646
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1240 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29647
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1224]]
29648
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1224 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
29649
+  (0.2ms) ROLLBACK
29650
+  (0.2ms) BEGIN
29651
+  (0.2ms) SAVEPOINT active_record_1
29652
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29653
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29654
+  (0.1ms) SAVEPOINT active_record_1
29655
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29656
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1225], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29657
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29658
+  (0.2ms) SAVEPOINT active_record_1
29659
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29660
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29661
+  (0.7ms) 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" = 1225 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1241)
29662
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1241]]
29663
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1225]]
29664
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1225 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
29665
+  (0.2ms) SAVEPOINT active_record_1
29666
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1225]]
29667
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29668
+ 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" = 1241 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29669
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29670
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1241 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29671
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1225]]
29672
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29673
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1241 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29674
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1225]]
29675
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
29676
+  (0.3ms) ROLLBACK
29677
+  (0.2ms) BEGIN
29678
+  (0.2ms) SAVEPOINT active_record_1
29679
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29680
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29681
+  (0.2ms) SAVEPOINT active_record_1
29682
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1226 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29683
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1226], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29684
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29685
+  (0.2ms) SAVEPOINT active_record_1
29686
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1226 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29687
+  (0.3ms) RELEASE SAVEPOINT active_record_1
29688
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1226 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1242)
29689
+  (0.2ms) SAVEPOINT active_record_1
29690
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1226 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29691
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1226], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29692
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29693
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1226 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1243)
29694
+  (0.3ms) ROLLBACK
29695
+  (0.2ms) BEGIN
29696
+  (0.2ms) SAVEPOINT active_record_1
29697
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29698
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29699
+  (0.2ms) SAVEPOINT active_record_1
29700
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29701
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1227], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29702
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29703
+  (0.2ms) SAVEPOINT active_record_1
29704
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29705
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1227], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29706
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29707
+ 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", 1245]]
29708
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1227]]
29709
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1227 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
29710
+  (0.2ms) SAVEPOINT active_record_1
29711
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1227]]
29712
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29713
+ 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" = 1244 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29714
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29715
+  (0.2ms) SAVEPOINT active_record_1
29716
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1227]]
29717
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29718
+ 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" = 1245 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29719
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29720
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1227 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29721
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1227 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29722
+  (0.2ms) SAVEPOINT active_record_1
29723
+ NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uduukAbVWYBUG2XOLlVjbQKqJcw4-PiWZfXxeuRAbWmA' LIMIT 1
29724
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1227], ["target_type", "User"], ["token", "uduukAbVWYBUG2XOLlVjbQKqJcw4-PiWZfXxeuRAbWmA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29725
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29726
+
29727
+ Sent mail to user@example.com (7.4ms)
29728
+ Date: Sat, 15 Nov 2014 21:50:05 +1100
29729
+ From: please-change-me-at-config-initializers-notify-user@example.com
29730
+ To: user@example.com
29731
+ Message-ID: <54672fdd33bdc_44c3fef0d865bf024375@wp.local.mail>
29732
+ Subject: Rails404: You have new Newpostnotification notifications.
29733
+ Mime-Version: 1.0
29734
+ Content-Type: text/html;
29735
+ charset=UTF-8
29736
+ Content-Transfer-Encoding: quoted-printable
29737
+
29738
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
29739
+ tml4/strict.dtd">
29740
+ <html>
29741
+ <head>
29742
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
29743
+ "/>
29744
+ <title></title>
29745
+ </head>
29746
+
29747
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
29748
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
29749
+ ing: optimizeLegibility;">
29750
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
29751
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
29752
+ Logo
29753
+ </div>
29754
+ </div>
29755
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
29756
+ ">
29757
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
29758
+ =
29759
+
29760
+ <div>
29761
+ New Post Notification happened. =
29762
+
29763
+ </div>
29764
+ <div>
29765
+ New Post Notification happened. =
29766
+
29767
+ </div>
29768
+
29769
+ </div>
29770
+ </div>
29771
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
29772
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
29773
+ <p style=3D"text-align: center;">
29774
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
29775
+ _unsubscribe?token=3DuduukAbVWYBUG2XOLlVjbQKqJcw4-PiWZfXxeuRAbWmA&amp;typ=
29776
+ e=3DNewPostNotification">Unsubscribe</a>
29777
+ </p>
29778
+ <p style=3D"text-align: center;">
29779
+ This is the default generated layout. A privacy declaration could g=
29780
+ o here.
29781
+ </p>
29782
+ <p style=3D"text-align: center; margin-bottom: 0px;">
29783
+ =C2=A9 MyCompany Pty Ltd
29784
+ </p>
29785
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
29786
+ ABN 123 456 789
29787
+ </p>
29788
+ </div>
29789
+ </div>
29790
+ </body>
29791
+ </html>=
29792
+
29793
+  (0.3ms) ROLLBACK
29794
+  (0.2ms) BEGIN
29795
+  (0.2ms) SAVEPOINT active_record_1
29796
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29797
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29798
+  (0.2ms) SAVEPOINT active_record_1
29799
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29800
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1228], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29801
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29802
+ 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", 1246]]
29803
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1228]]
29804
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1228 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
29805
+  (0.2ms) SAVEPOINT active_record_1
29806
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1228]]
29807
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29808
+ 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" = 1246 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29809
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29810
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1246 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29811
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1228]]
29812
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29813
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1228 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29814
+  (0.2ms) SAVEPOINT active_record_1
29815
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pCSIFEkbruqnuKnb18si5AVz5svdrggr3oOimB9EwceA' LIMIT 1
29816
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1228], ["target_type", "User"], ["token", "pCSIFEkbruqnuKnb18si5AVz5svdrggr3oOimB9EwceA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29817
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29818
+
29819
+ Sent mail to user@example.com (6.0ms)
29820
+ Date: Sat, 15 Nov 2014 21:50:05 +1100
29821
+ From: please-change-me-at-config-initializers-notify-user@example.com
29822
+ To: user@example.com
29823
+ Message-ID: <54672fdd3df38_44c3fef0d865bf0244fe@wp.local.mail>
29824
+ Subject: Rails404: You have a new Newpostnotification notification.
29825
+ Mime-Version: 1.0
29826
+ Content-Type: text/html;
29827
+ charset=UTF-8
29828
+ Content-Transfer-Encoding: quoted-printable
29829
+
29830
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
29831
+ tml4/strict.dtd">
29832
+ <html>
29833
+ <head>
29834
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
29835
+ "/>
29836
+ <title></title>
29837
+ </head>
29838
+
29839
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
29840
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
29841
+ ing: optimizeLegibility;">
29842
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
29843
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
29844
+ Logo
29845
+ </div>
29846
+ </div>
29847
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
29848
+ ">
29849
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
29850
+ New Post Notification happened.
29851
+
29852
+ </div>
29853
+ </div>
29854
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
29855
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
29856
+ <p style=3D"text-align: center;">
29857
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
29858
+ _unsubscribe?token=3DpCSIFEkbruqnuKnb18si5AVz5svdrggr3oOimB9EwceA&amp;typ=
29859
+ e=3DNewPostNotification">Unsubscribe</a>
29860
+ </p>
29861
+ <p style=3D"text-align: center;">
29862
+ This is the default generated layout. A privacy declaration could g=
29863
+ o here.
29864
+ </p>
29865
+ <p style=3D"text-align: center; margin-bottom: 0px;">
29866
+ =C2=A9 MyCompany Pty Ltd
29867
+ </p>
29868
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
29869
+ ABN 123 456 789
29870
+ </p>
29871
+ </div>
29872
+ </div>
29873
+ </body>
29874
+ </html>=
29875
+
29876
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1228 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
29877
+  (0.3ms) ROLLBACK
29878
+  (0.2ms) BEGIN
29879
+  (0.3ms) SAVEPOINT active_record_1
29880
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29881
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29882
+  (0.2ms) SAVEPOINT active_record_1
29883
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1229) LIMIT 1
29884
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1229], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29885
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29886
+  (0.2ms) SAVEPOINT active_record_1
29887
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1229 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29888
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
29889
+ 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
29890
+  (0.2ms) ROLLBACK
29891
+  (0.2ms) BEGIN
29892
+  (0.2ms) SAVEPOINT active_record_1
29893
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29894
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29895
+  (0.3ms) SAVEPOINT active_record_1
29896
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1230 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29897
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1230], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29898
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29899
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1247 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
29900
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1230]]
29901
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1230 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29902
+  (0.2ms) ROLLBACK
29903
+  (0.2ms) BEGIN
29904
+  (0.2ms) SAVEPOINT active_record_1
29905
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29906
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29907
+  (0.2ms) SAVEPOINT active_record_1
29908
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29909
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1231], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29910
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29911
+  (0.2ms) SAVEPOINT active_record_1
29912
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29913
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1231], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29914
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29915
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1249]]
29916
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1231]]
29917
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1231 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
29918
+  (0.2ms) SAVEPOINT active_record_1
29919
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1231]]
29920
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29921
+ 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" = 1248 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29922
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29923
+  (0.2ms) SAVEPOINT active_record_1
29924
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1231]]
29925
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
29926
+ 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" = 1249 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29927
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29928
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1231 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
29929
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1231 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
29930
+  (0.2ms) SAVEPOINT active_record_1
29931
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zJAKR2Nwy9gNlr6M0ehQVg8Y8cDkOotoct_Py1fJJ0LA' LIMIT 1
29932
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1231], ["target_type", "User"], ["token", "zJAKR2Nwy9gNlr6M0ehQVg8Y8cDkOotoct_Py1fJJ0LA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
29933
+  (0.2ms) RELEASE SAVEPOINT active_record_1
29934
+
29935
+ Sent mail to user@example.com (5.5ms)
29936
+ Date: Sat, 15 Nov 2014 21:50:05 +1100
29937
+ From: please-change-me-at-config-initializers-notify-user@example.com
29938
+ To: user@example.com
29939
+ Message-ID: <54672fdd51d62_44c3fef0d865bf02453a@wp.local.mail>
29940
+ Subject: Rails404: You have new Newpostnotification notifications.
29941
+ Mime-Version: 1.0
29942
+ Content-Type: text/html;
29943
+ charset=UTF-8
29944
+ Content-Transfer-Encoding: quoted-printable
29945
+
29946
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
29947
+ tml4/strict.dtd">
29948
+ <html>
29949
+ <head>
29950
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
29951
+ "/>
29952
+ <title></title>
29953
+ </head>
29954
+
29955
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
29956
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
29957
+ ing: optimizeLegibility;">
29958
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
29959
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
29960
+ Logo
29961
+ </div>
29962
+ </div>
29963
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
29964
+ ">
29965
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
29966
+ =
29967
+
29968
+ <div>
29969
+ New Post Notification happened. =
29970
+
29971
+ </div>
29972
+ <div>
29973
+ New Post Notification happened. =
29974
+
29975
+ </div>
29976
+
29977
+ </div>
29978
+ </div>
29979
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
29980
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
29981
+ <p style=3D"text-align: center;">
29982
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
29983
+ _unsubscribe?token=3DzJAKR2Nwy9gNlr6M0ehQVg8Y8cDkOotoct_Py1fJJ0LA&amp;typ=
29984
+ e=3DNewPostNotification">Unsubscribe</a>
29985
+ </p>
29986
+ <p style=3D"text-align: center;">
29987
+ This is the default generated layout. A privacy declaration could g=
29988
+ o here.
29989
+ </p>
29990
+ <p style=3D"text-align: center; margin-bottom: 0px;">
29991
+ =C2=A9 MyCompany Pty Ltd
29992
+ </p>
29993
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
29994
+ ABN 123 456 789
29995
+ </p>
29996
+ </div>
29997
+ </div>
29998
+ </body>
29999
+ </html>=
30000
+
30001
+  (0.3ms) ROLLBACK
30002
+  (0.2ms) BEGIN
30003
+  (0.2ms) SAVEPOINT active_record_1
30004
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30005
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30006
+  (0.2ms) SAVEPOINT active_record_1
30007
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30008
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1232], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30009
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30010
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1250]]
30011
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1232]]
30012
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1232 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
30013
+  (0.2ms) SAVEPOINT active_record_1
30014
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1232]]
30015
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30016
+ 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" = 1250 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30017
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30018
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1250 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
30019
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1232]]
30020
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
30021
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1232 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
30022
+  (0.2ms) SAVEPOINT active_record_1
30023
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3fgccd6b3yW6RnEtWjbmQwTmD8bPGyEnj27W20KcQSBQ' LIMIT 1
30024
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1232], ["target_type", "User"], ["token", "3fgccd6b3yW6RnEtWjbmQwTmD8bPGyEnj27W20KcQSBQ"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30025
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30026
+
30027
+ Sent mail to user@example.com (6.6ms)
30028
+ Date: Sat, 15 Nov 2014 21:50:05 +1100
30029
+ From: please-change-me-at-config-initializers-notify-user@example.com
30030
+ To: user@example.com
30031
+ Message-ID: <54672fdd5af46_44c3fef0d865bf02461c@wp.local.mail>
30032
+ Subject: Rails404: You have a new Newpostnotification notification.
30033
+ Mime-Version: 1.0
30034
+ Content-Type: text/html;
30035
+ charset=UTF-8
30036
+ Content-Transfer-Encoding: quoted-printable
30037
+
30038
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
30039
+ tml4/strict.dtd">
30040
+ <html>
30041
+ <head>
30042
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
30043
+ "/>
30044
+ <title></title>
30045
+ </head>
30046
+
30047
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
30048
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
30049
+ ing: optimizeLegibility;">
30050
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
30051
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
30052
+ Logo
30053
+ </div>
30054
+ </div>
30055
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
30056
+ ">
30057
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
30058
+ New Post Notification happened.
30059
+
30060
+ </div>
30061
+ </div>
30062
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
30063
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
30064
+ <p style=3D"text-align: center;">
30065
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
30066
+ _unsubscribe?token=3D3fgccd6b3yW6RnEtWjbmQwTmD8bPGyEnj27W20KcQSBQ&amp;typ=
30067
+ e=3DNewPostNotification">Unsubscribe</a>
30068
+ </p>
30069
+ <p style=3D"text-align: center;">
30070
+ This is the default generated layout. A privacy declaration could g=
30071
+ o here.
30072
+ </p>
30073
+ <p style=3D"text-align: center; margin-bottom: 0px;">
30074
+ =C2=A9 MyCompany Pty Ltd
30075
+ </p>
30076
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
30077
+ ABN 123 456 789
30078
+ </p>
30079
+ </div>
30080
+ </div>
30081
+ </body>
30082
+ </html>=
30083
+
30084
+  (0.4ms) ROLLBACK
30085
+  (0.2ms) BEGIN
30086
+  (0.4ms) SAVEPOINT active_record_1
30087
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30088
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30089
+  (0.2ms) SAVEPOINT active_record_1
30090
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30091
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1233], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30092
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30093
+  (0.2ms) SAVEPOINT active_record_1
30094
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30095
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30096
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30097
+  (0.2ms) SAVEPOINT active_record_1
30098
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30099
+ 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" = 1251 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30100
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30101
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1251 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
30102
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1233]]
30103
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
30104
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
30105
+  (0.3ms) ROLLBACK
30106
+  (0.2ms) BEGIN
30107
+  (0.2ms) SAVEPOINT active_record_1
30108
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30109
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30110
+  (0.2ms) SAVEPOINT active_record_1
30111
+ 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" = 1234) LIMIT 1
30112
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1234], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30113
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30114
+  (0.2ms) SAVEPOINT active_record_1
30115
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1234 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30116
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
30117
+  (0.2ms) SAVEPOINT active_record_1
30118
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1234 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30119
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
30120
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1234 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30121
+  (0.2ms) ROLLBACK
30122
+  (0.2ms) BEGIN
30123
+  (0.2ms) SAVEPOINT active_record_1
30124
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30125
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30126
+  (0.2ms) SAVEPOINT active_record_1
30127
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1235) LIMIT 1
30128
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1235], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30129
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30130
+  (0.3ms) SAVEPOINT active_record_1
30131
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 281 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1235) LIMIT 1
30132
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30133
+  (0.2ms) SAVEPOINT active_record_1
30134
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30135
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1235], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30136
+  (0.1ms) RELEASE SAVEPOINT active_record_1
30137
+  (0.1ms) SAVEPOINT active_record_1
30138
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30139
+  (0.1ms) RELEASE SAVEPOINT active_record_1
30140
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30141
+  (0.2ms) SAVEPOINT active_record_1
30142
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30143
+ 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" = 1252 [["state", "sent"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30144
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30145
+ NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1252 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
30146
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1235]]
30147
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
30148
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
30149
+  (0.2ms) ROLLBACK
30150
+  (0.2ms) BEGIN
30151
+  (0.2ms) SAVEPOINT active_record_1
30152
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30153
+  (0.3ms) RELEASE SAVEPOINT active_record_1
30154
+  (0.2ms) SAVEPOINT active_record_1
30155
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1236 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30156
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1236], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30157
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30158
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1236 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
30159
+  (0.3ms) SAVEPOINT active_record_1
30160
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7owYAVGs6itdTMtpmeOxsA8QHLiiuKWudw5hgoTYodeA' LIMIT 1
30161
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1236], ["target_type", "User"], ["token", "7owYAVGs6itdTMtpmeOxsA8QHLiiuKWudw5hgoTYodeA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30162
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30163
+  (0.2ms) ROLLBACK
30164
+  (0.2ms) BEGIN
30165
+  (0.3ms) SAVEPOINT active_record_1
30166
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30167
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30168
+  (0.2ms) SAVEPOINT active_record_1
30169
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1237 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30170
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1237], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30171
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30172
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1237 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
30173
+  (0.3ms) SAVEPOINT active_record_1
30174
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'W8JLd8bws9e8SLvg8AtKygwWqy3vZ6HBom5mo6WP_89g' LIMIT 1
30175
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1237], ["target_type", "User"], ["token", "W8JLd8bws9e8SLvg8AtKygwWqy3vZ6HBom5mo6WP_89g"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30176
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30177
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1237 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
30178
+  (0.3ms) ROLLBACK
30179
+  (0.2ms) BEGIN
30180
+  (0.3ms) SAVEPOINT active_record_1
30181
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30182
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30183
+  (0.3ms) SAVEPOINT active_record_1
30184
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1238 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30185
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["state", "pending"], ["target_id", 1238], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30186
+  (0.3ms) RELEASE SAVEPOINT active_record_1
30187
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1238 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
30188
+  (0.3ms) SAVEPOINT active_record_1
30189
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eMlXr2CFWCehojmgH9BnkQxnT-x_11-GtB_3i2ep-aEA' LIMIT 1
30190
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1238], ["target_type", "User"], ["token", "eMlXr2CFWCehojmgH9BnkQxnT-x_11-GtB_3i2ep-aEA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30191
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30192
+  (0.2ms) SAVEPOINT active_record_1
30193
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 344 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30194
+  (0.3ms) RELEASE SAVEPOINT active_record_1
30195
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1238 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
30196
+  (0.3ms) SAVEPOINT active_record_1
30197
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yea-fj6ajwIyjTzEXDTpEwYc6zeRAa8g54WRZiAJiI9A' LIMIT 1
30198
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1238], ["target_type", "User"], ["token", "yea-fj6ajwIyjTzEXDTpEwYc6zeRAa8g54WRZiAJiI9A"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30199
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30200
+  (0.3ms) ROLLBACK
30201
+  (0.2ms) BEGIN
30202
+  (0.2ms) SAVEPOINT active_record_1
30203
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30204
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30205
+  (0.2ms) SAVEPOINT active_record_1
30206
+ 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" = 1239) LIMIT 1
30207
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1239], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30208
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30209
+  (0.2ms) SAVEPOINT active_record_1
30210
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 282 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1239) LIMIT 1
30211
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30212
+  (0.2ms) SAVEPOINT active_record_1
30213
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1239 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30214
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
30215
+  (0.2ms) ROLLBACK
30216
+  (0.2ms) BEGIN
30217
+  (0.2ms) SAVEPOINT active_record_1
30218
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30219
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30220
+  (0.2ms) SAVEPOINT active_record_1
30221
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1240) LIMIT 1
30222
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1240], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30223
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30224
+  (0.2ms) SAVEPOINT active_record_1
30225
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 283 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1240) LIMIT 1
30226
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30227
+  (0.2ms) SAVEPOINT active_record_1
30228
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1240 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30229
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
30230
+  (0.2ms) ROLLBACK
30231
+  (0.2ms) BEGIN
30232
+  (0.2ms) SAVEPOINT active_record_1
30233
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30234
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30235
+  (0.2ms) SAVEPOINT active_record_1
30236
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1241) LIMIT 1
30237
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1241], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30238
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30239
+  (0.2ms) SAVEPOINT active_record_1
30240
+ NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 284 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1241) LIMIT 1
30241
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30242
+  (0.2ms) SAVEPOINT active_record_1
30243
+ 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" = 1241) LIMIT 1
30244
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
30245
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30246
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30247
+  (0.2ms) SAVEPOINT active_record_1
30248
+ SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 284]]
30249
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30250
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1241 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30251
+  (0.2ms) ROLLBACK
30252
+  (0.2ms) BEGIN
30253
+  (0.2ms) SAVEPOINT active_record_1
30254
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30255
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30256
+  (0.2ms) SAVEPOINT active_record_1
30257
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
30258
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1242], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30259
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30260
+  (0.2ms) ROLLBACK
30261
+  (0.2ms) BEGIN
30262
+  (0.2ms) SAVEPOINT active_record_1
30263
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30264
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30265
+  (0.2ms) SAVEPOINT active_record_1
30266
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3cSXXy_vzdimJ-6jz8IMrw9W_kQs1mqqZPiWac2okILA' LIMIT 1
30267
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1243], ["target_type", "User"], ["token", "3cSXXy_vzdimJ-6jz8IMrw9W_kQs1mqqZPiWac2okILA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30268
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30269
+  (0.3ms) SAVEPOINT active_record_1
30270
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30271
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3cSXXy_vzdimJ-6jz8IMrw9W_kQs1mqqZPiWac2okILA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
30272
+  (0.2ms) ROLLBACK
30273
+  (0.2ms) BEGIN
30274
+  (0.2ms) SAVEPOINT active_record_1
30275
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30276
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30277
+  (0.2ms) SAVEPOINT active_record_1
30278
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hHbDdrnxXK5eAZ_J64C_owNsKldTOix4-5NACQwK9NHw' LIMIT 1
30279
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1244], ["target_type", "User"], ["token", "hHbDdrnxXK5eAZ_J64C_owNsKldTOix4-5NACQwK9NHw"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30280
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30281
+  (0.2ms) SAVEPOINT active_record_1
30282
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30283
+  (0.2ms) SAVEPOINT active_record_1
30284
+ SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 347 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30285
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30286
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hHbDdrnxXK5eAZ_J64C_owNsKldTOix4-5NACQwK9NHw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
30287
+  (0.3ms) ROLLBACK
30288
+  (0.2ms) BEGIN
30289
+  (0.3ms) SAVEPOINT active_record_1
30290
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30291
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30292
+  (0.2ms) SAVEPOINT active_record_1
30293
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'dAr8Z-0SQsVvlXKzGCsE9wNlQxrJ64k3wp7Jdo3OkskA' LIMIT 1
30294
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1245], ["target_type", "User"], ["token", "dAr8Z-0SQsVvlXKzGCsE9wNlQxrJ64k3wp7Jdo3OkskA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30295
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30296
+  (0.2ms) SAVEPOINT active_record_1
30297
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30298
+  (0.2ms) SAVEPOINT active_record_1
30299
+ SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 348 [["active", false], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30300
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30301
+  (0.2ms) ROLLBACK
30302
+  (0.2ms) BEGIN
30303
+  (0.2ms) SAVEPOINT active_record_1
30304
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30305
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30306
+  (0.2ms) SAVEPOINT active_record_1
30307
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'EtGWSg7wT2vBydeqjK5v-QTWV2w-XR9b0WXtbLUUEsHA' LIMIT 1
30308
+ 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", Sat, 15 Nov 2014 10:50:05 UTC +00:00], ["target_id", 1246], ["target_type", "User"], ["token", "EtGWSg7wT2vBydeqjK5v-QTWV2w-XR9b0WXtbLUUEsHA"], ["type", "NewPostNotification"], ["updated_at", Sat, 15 Nov 2014 10:50:05 UTC +00:00]]
30309
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30310
+  (0.2ms) SAVEPOINT active_record_1
30311
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30312
+  (0.2ms) ROLLBACK
30313
+  (0.2ms) BEGIN
30314
+  (0.2ms) ROLLBACK
30315
+  (0.2ms) BEGIN
30316
+  (0.2ms) ROLLBACK
30317
+  (0.2ms) BEGIN
30318
+  (0.2ms) ROLLBACK
30319
+  (0.2ms) BEGIN
30320
+  (0.2ms) ROLLBACK
30321
+  (0.3ms) BEGIN
30322
+  (0.2ms) ROLLBACK
30323
+  (0.2ms) BEGIN
30324
+  (0.2ms) ROLLBACK
30325
+  (0.2ms) BEGIN
30326
+  (0.3ms) ROLLBACK