notify_user 0.0.19 → 0.0.20

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: c1dd2facd94fde1472249cc3e3a65c61121b69ab
4
- data.tar.gz: 6dbed392b3547e7732300cefddb6abfcb8ad6b5f
3
+ metadata.gz: 7f505749dbb731cb8d626b84eb0f553add13cae5
4
+ data.tar.gz: db61e5684a71778eb1cf9e6d22c63ef79fa1bdea
5
5
  SHA512:
6
- metadata.gz: c612f793c3816c16aa92e2c373c26fc100a02b5a7220d89a7d6a98952bd98be5ecf36c4a5ece9a2b42c4c18b6eb28c329fdc729f45274c5f626094e984dfe678
7
- data.tar.gz: a57d58340f7cffc6218f7d0d7f35097ac176e786e95d0c4b70791d5d45ba5b049b99f90e3209cd691bbb8a3a6d3dbcb41962ea6284371b692c0b38f1cd915e9e
6
+ metadata.gz: e25abe6a48afe80fb60a4a00a791e25083994073ad04739f73bce3b193a0c4eb25d48392cbab2efe457b6312525bb755ec4032b888df9171c145d17340a984ac
7
+ data.tar.gz: e935f3e451ed18b6eab7e05b259c0970f70ee20070456e5f95d570ec62cdb205ce0ff533a4eb1b994bd7b907139625f26eacbeeecc2877415e9ee7b017a55cf3
@@ -126,7 +126,7 @@ module NotifyUser
126
126
  ## Channels
127
127
  class_attribute :channels
128
128
  self.channels = {
129
- action_mailer: {description: 'Email notifications'}
129
+
130
130
  }
131
131
 
132
132
  # Not sure about this. The JSON and web feeds don't fit into channels, because nothing is broadcast through
@@ -0,0 +1,32 @@
1
+ module NotifyUser
2
+ class PubNub
3
+
4
+ #sends push notification
5
+ def self.push_notification(notification)
6
+ pubnub = Pubnub.new(
7
+ :origin => ENV['PN_ORIGIN'],
8
+ :publish_key => ENV['PN_PUBLISH_KEY'],
9
+ :subscribe_key => ENV['PN_SUBSCRIBE_KEY'],
10
+ :secret_key => ENV['PN_SECRET_KEY'],
11
+ :logger => Logger.new(STDOUT)
12
+ )
13
+
14
+ pubnub.grant( auth_key: ENV['PN_SECRET_KEY'],
15
+ :read => true,
16
+ :write => true,
17
+ :ttl => 525600,
18
+ :http_sync => true
19
+ )
20
+
21
+ pubnub.publish(
22
+ channel: notification.target.uuid,
23
+ http_sync: true,
24
+ :message => {
25
+ aps: {
26
+ alert: notification.params["message"]
27
+ }
28
+ }
29
+ )
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,17 @@
1
+ class PubnubChannel
2
+
3
+ class << self
4
+
5
+ def default_options
6
+ {
7
+ description: "PubNub Notifications"
8
+ }
9
+ end
10
+
11
+ def deliver(notification, options={})
12
+ NotifyUser::PubNub.push_notification(notification)
13
+ end
14
+
15
+ end
16
+
17
+ end
@@ -1,3 +1,3 @@
1
1
  module NotifyUser
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
@@ -15806,3 +15806,2189 @@ o here.
15806
15806
   (0.2ms) ROLLBACK
15807
15807
   (0.2ms) BEGIN
15808
15808
   (0.2ms) ROLLBACK
15809
+  (1.2ms) BEGIN
15810
+  (1.0ms) SAVEPOINT active_record_1
15811
+ SQL (15.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15812
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15813
+ Processing by NotifyUser::NotificationsController#index as HTML
15814
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms)
15815
+ Completed 200 OK in 17ms (Views: 13.1ms | ActiveRecord: 0.0ms)
15816
+  (0.5ms) ROLLBACK
15817
+  (0.3ms) BEGIN
15818
+  (0.2ms) SAVEPOINT active_record_1
15819
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15820
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15821
+  (0.3ms) SAVEPOINT active_record_1
15822
+  (5.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15823
+ SQL (3.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15824
+  (0.4ms) RELEASE SAVEPOINT active_record_1
15825
+ Processing by NotifyUser::NotificationsController#index as JSON
15826
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 633 AND "notify_user_notifications"."target_type" = 'User'
15827
+ NotifyUser::BaseNotification Load (3.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 633 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
15828
+ Completed 200 OK in 20ms (Views: 10.7ms | ActiveRecord: 3.7ms)
15829
+  (0.4ms) ROLLBACK
15830
+  (0.2ms) BEGIN
15831
+  (0.3ms) SAVEPOINT active_record_1
15832
+ SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15833
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15834
+  (0.2ms) SAVEPOINT active_record_1
15835
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15836
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15837
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15838
+  (0.2ms) SAVEPOINT active_record_1
15839
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15840
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15841
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15842
+  (0.2ms) SAVEPOINT active_record_1
15843
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15844
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15845
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15846
+ Processing by NotifyUser::NotificationsController#index as HTML
15847
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 634 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
15848
+ Completed 200 OK in 34ms (Views: 32.5ms | ActiveRecord: 0.7ms)
15849
+  (0.3ms) ROLLBACK
15850
+  (0.2ms) BEGIN
15851
+  (0.2ms) SAVEPOINT active_record_1
15852
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15853
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15854
+  (0.2ms) SAVEPOINT active_record_1
15855
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15856
+ SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15857
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15858
+  (0.3ms) SAVEPOINT active_record_1
15859
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15860
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15861
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15862
+  (0.3ms) SAVEPOINT active_record_1
15863
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15864
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15865
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15866
+ Processing by NotifyUser::NotificationsController#read as HTML
15867
+ Parameters: {"id"=>"638"}
15868
+ NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 635 AND "notify_user_notifications"."target_type" = 'User' AND (id = '638') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
15869
+  (0.2ms) SAVEPOINT active_record_1
15870
+ User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 635]]
15871
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15872
+ SQL (1.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 638 [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15873
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15874
+ Completed 200 OK in 24ms (Views: 1.8ms | ActiveRecord: 4.9ms)
15875
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 638 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
15876
+  (0.3ms) ROLLBACK
15877
+  (0.2ms) BEGIN
15878
+  (0.2ms) SAVEPOINT active_record_1
15879
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15880
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15881
+  (0.2ms) SAVEPOINT active_record_1
15882
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15883
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15884
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15885
+  (0.2ms) SAVEPOINT active_record_1
15886
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15887
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15888
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15889
+  (0.2ms) SAVEPOINT active_record_1
15890
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15891
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15892
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15893
+ Processing by NotifyUser::NotificationsController#read as HTML
15894
+ Parameters: {"id"=>"641"}
15895
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 636 AND "notify_user_notifications"."target_type" = 'User' AND (id = '641') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
15896
+  (0.2ms) SAVEPOINT active_record_1
15897
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 636]]
15898
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15899
+ 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" = 641 [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15900
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15901
+ Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 3.1ms)
15902
+ Processing by NotifyUser::NotificationsController#read as HTML
15903
+ Parameters: {"id"=>"641"}
15904
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 636 AND "notify_user_notifications"."target_type" = 'User' AND (id = '641') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
15905
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.7ms)
15906
+  (0.3ms) ROLLBACK
15907
+  (0.2ms) BEGIN
15908
+  (0.2ms) SAVEPOINT active_record_1
15909
+ SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15910
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15911
+  (0.2ms) SAVEPOINT active_record_1
15912
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15913
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15914
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15915
+  (0.2ms) SAVEPOINT active_record_1
15916
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15917
+ SQL (11.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15918
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15919
+  (0.3ms) SAVEPOINT active_record_1
15920
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15921
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
15922
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15923
+ Processing by NotifyUser::NotificationsController#mark_all as HTML
15924
+ SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 637 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))
15925
+ Redirected to http://test.host/notify_user/notifications
15926
+ Completed 302 Found in 3ms (ActiveRecord: 1.2ms)
15927
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 637 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
15928
+  (0.3ms) ROLLBACK
15929
+  (0.2ms) BEGIN
15930
+  (0.3ms) SAVEPOINT active_record_1
15931
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15932
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15933
+  (0.2ms) SAVEPOINT active_record_1
15934
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 638 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15935
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 638], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15936
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15937
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
15938
+ Parameters: {"ids"=>["647"]}
15939
+ SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 638 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('647'))
15940
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 638 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('647'))
15941
+ Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 1.3ms)
15942
+ NewPostNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 647]]
15943
+  (0.3ms) ROLLBACK
15944
+  (0.2ms) BEGIN
15945
+  (0.2ms) SAVEPOINT active_record_1
15946
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15947
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15948
+  (0.2ms) SAVEPOINT active_record_1
15949
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15950
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 639], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15951
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15952
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
15953
+ Parameters: {"ids"=>["648"]}
15954
+ SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 639 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('648'))
15955
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 639 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('648'))
15956
+ Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 1.3ms)
15957
+  (0.3ms) ROLLBACK
15958
+  (0.2ms) BEGIN
15959
+  (0.3ms) SAVEPOINT active_record_1
15960
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15961
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15962
+  (0.2ms) SAVEPOINT active_record_1
15963
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15964
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15965
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15966
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15967
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
15968
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
15969
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15970
+  (0.3ms) SAVEPOINT active_record_1
15971
+ 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" = 640) LIMIT 1
15972
+ SQL (2.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15973
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15974
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
15975
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15976
+ Completed 200 OK in 25ms (Views: 0.4ms | ActiveRecord: 5.5ms)
15977
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15978
+  (0.3ms) ROLLBACK
15979
+  (0.2ms) BEGIN
15980
+  (0.3ms) SAVEPOINT active_record_1
15981
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15982
+  (0.3ms) RELEASE SAVEPOINT active_record_1
15983
+  (0.3ms) SAVEPOINT active_record_1
15984
+  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15985
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15986
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15987
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15988
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
15989
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
15990
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15991
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
15992
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15993
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 1.7ms)
15994
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
15995
+  (0.3ms) ROLLBACK
15996
+  (0.2ms) BEGIN
15997
+  (0.2ms) SAVEPOINT active_record_1
15998
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
15999
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16000
+  (0.2ms) SAVEPOINT active_record_1
16001
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16002
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16003
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16004
+ Processing by NotifyUser::NotificationsController#unsubscribe as HTML
16005
+ Parameters: {"type"=>"NewPostNotification"}
16006
+  (0.2ms) SAVEPOINT active_record_1
16007
+ 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" = 642) LIMIT 1
16008
+ SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16009
+  (0.4ms) RELEASE SAVEPOINT active_record_1
16010
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
16011
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16012
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16013
+ Completed 302 Found in 9ms (ActiveRecord: 2.7ms)
16014
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
16015
+  (0.2ms) ROLLBACK
16016
+  (0.2ms) BEGIN
16017
+  (0.3ms) SAVEPOINT active_record_1
16018
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16019
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16020
+  (0.3ms) SAVEPOINT active_record_1
16021
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16022
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16023
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16024
+  (0.2ms) SAVEPOINT active_record_1
16025
+ 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" = 643) LIMIT 1
16026
+ SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16027
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16028
+ Processing by NotifyUser::NotificationsController#subscribe as HTML
16029
+ Parameters: {"type"=>"NewPostNotification"}
16030
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16031
+  (0.2ms) SAVEPOINT active_record_1
16032
+ SQL (0.8ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 152]]
16033
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16034
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
16035
+ Completed 302 Found in 5ms (ActiveRecord: 1.9ms)
16036
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
16037
+  (0.2ms) ROLLBACK
16038
+  (0.2ms) BEGIN
16039
+  (0.2ms) SAVEPOINT active_record_1
16040
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16041
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16042
+  (0.2ms) SAVEPOINT active_record_1
16043
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 644 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16044
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16045
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16046
+ NotifyUser::UserHash Load (2.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 644 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16047
+  (0.4ms) SAVEPOINT active_record_1
16048
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw' LIMIT 1
16049
+ SQL (2.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 644], ["target_type", "User"], ["token", "mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16050
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16051
+ Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
16052
+ Parameters: {"type"=>"NewPostNotification", "token"=>"mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw"}
16053
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
16054
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16055
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 644]]
16056
+  (0.2ms) SAVEPOINT active_record_1
16057
+ 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" = 644) LIMIT 1
16058
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16059
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16060
+  (0.2ms) SAVEPOINT active_record_1
16061
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 186 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16062
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16063
+ Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 4.5ms)
16064
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1
16065
+  (0.3ms) ROLLBACK
16066
+  (0.1ms) BEGIN
16067
+ 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
16068
+  (0.3ms) SAVEPOINT active_record_1
16069
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
16070
+ 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
16071
+  (0.2ms) SAVEPOINT active_record_1
16072
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16073
+  (0.3ms) ROLLBACK
16074
+  (0.2ms) BEGIN
16075
+ 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
16076
+  (0.2ms) SAVEPOINT active_record_1
16077
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16078
+ NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16079
+  (0.3ms) SAVEPOINT active_record_1
16080
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16081
+  (0.3ms) ROLLBACK
16082
+  (0.3ms) BEGIN
16083
+ NotifyUser::UserHash Load (1.0ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16084
+  (0.3ms) SAVEPOINT active_record_1
16085
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
16086
+ 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
16087
+  (0.3ms) SAVEPOINT active_record_1
16088
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
16089
+  (0.2ms) ROLLBACK
16090
+  (0.2ms) BEGIN
16091
+  (0.3ms) SAVEPOINT active_record_1
16092
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16093
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16094
+  (0.2ms) SAVEPOINT active_record_1
16095
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 645 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16096
+ SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16097
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16098
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 645 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))
16099
+  (0.2ms) ROLLBACK
16100
+  (0.2ms) BEGIN
16101
+  (0.2ms) SAVEPOINT active_record_1
16102
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16103
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16104
+  (0.3ms) SAVEPOINT active_record_1
16105
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 646 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16106
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16107
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16108
+  (0.2ms) ROLLBACK
16109
+  (0.2ms) BEGIN
16110
+  (0.2ms) SAVEPOINT active_record_1
16111
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16112
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16113
+  (0.3ms) SAVEPOINT active_record_1
16114
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 647 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16115
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16116
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16117
+  (0.3ms) ROLLBACK
16118
+  (0.2ms) BEGIN
16119
+  (0.2ms) SAVEPOINT active_record_1
16120
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16121
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16122
+  (0.2ms) SAVEPOINT active_record_1
16123
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16124
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16125
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16126
+  (0.2ms) SAVEPOINT active_record_1
16127
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16128
+ 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" = 657 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16129
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16130
+ 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
16131
+  (0.4ms) ROLLBACK
16132
+  (0.2ms) BEGIN
16133
+  (0.2ms) SAVEPOINT active_record_1
16134
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16135
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16136
+  (0.2ms) SAVEPOINT active_record_1
16137
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 649 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16138
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 649], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16139
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16140
+  (0.2ms) SAVEPOINT active_record_1
16141
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 649 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16142
+ 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" = 658 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16143
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16144
+ NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
16145
+  (0.3ms) ROLLBACK
16146
+  (0.2ms) BEGIN
16147
+  (0.2ms) SAVEPOINT active_record_1
16148
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16149
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16150
+  (0.2ms) SAVEPOINT active_record_1
16151
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16152
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 650], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16153
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16154
+  (0.2ms) SAVEPOINT active_record_1
16155
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16156
+ 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" = 659 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16157
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16158
+ 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
16159
+  (0.2ms) ROLLBACK
16160
+  (0.2ms) BEGIN
16161
+  (0.2ms) SAVEPOINT active_record_1
16162
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16163
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16164
+  (0.3ms) SAVEPOINT active_record_1
16165
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 651 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16166
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16167
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16168
+  (0.2ms) SAVEPOINT active_record_1
16169
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 651 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16170
+ 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" = 660 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16171
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16172
+ 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
16173
+  (0.2ms) ROLLBACK
16174
+  (0.2ms) BEGIN
16175
+  (0.3ms) SAVEPOINT active_record_1
16176
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16177
+  (0.4ms) RELEASE SAVEPOINT active_record_1
16178
+  (0.3ms) SAVEPOINT active_record_1
16179
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16180
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16181
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16182
+  (0.4ms) SAVEPOINT active_record_1
16183
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
16184
+  (0.3ms) ROLLBACK
16185
+  (0.2ms) BEGIN
16186
+  (0.2ms) SAVEPOINT active_record_1
16187
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16188
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16189
+  (0.4ms) SAVEPOINT active_record_1
16190
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16191
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16192
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16193
+  (0.2ms) SAVEPOINT active_record_1
16194
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16195
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16196
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 653 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 662)
16197
+ NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 662]]
16198
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 653]]
16199
+ 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" = 653 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
16200
+  (0.2ms) SAVEPOINT active_record_1
16201
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 653]]
16202
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16203
+ 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" = 662 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16204
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16205
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 662 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16206
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 653]]
16207
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16208
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 662 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16209
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 653]]
16210
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
16211
+  (0.3ms) ROLLBACK
16212
+  (0.2ms) BEGIN
16213
+  (0.2ms) SAVEPOINT active_record_1
16214
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16215
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16216
+  (0.2ms) SAVEPOINT active_record_1
16217
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16218
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16219
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16220
+  (0.2ms) SAVEPOINT active_record_1
16221
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16222
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16223
+  (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" = 654 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 663)
16224
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 663]]
16225
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]
16226
+ 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" = 654 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
16227
+  (0.2ms) SAVEPOINT active_record_1
16228
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]
16229
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16230
+ 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" = 663 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16231
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16232
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 663 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16233
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]
16234
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16235
+ NewPostNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 663 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16236
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]
16237
+  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
16238
+  (0.5ms) ROLLBACK
16239
+  (0.3ms) BEGIN
16240
+  (0.3ms) SAVEPOINT active_record_1
16241
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16242
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16243
+  (0.3ms) SAVEPOINT active_record_1
16244
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16245
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16246
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16247
+  (0.2ms) SAVEPOINT active_record_1
16248
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16249
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16250
+  (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" = 655 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 664)
16251
+  (0.3ms) SAVEPOINT active_record_1
16252
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16253
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16254
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16255
+  (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" = 655 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 665)
16256
+  (0.3ms) ROLLBACK
16257
+  (0.3ms) BEGIN
16258
+  (0.2ms) SAVEPOINT active_record_1
16259
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16260
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16261
+  (0.2ms) SAVEPOINT active_record_1
16262
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16263
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16264
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16265
+  (0.3ms) SAVEPOINT active_record_1
16266
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16267
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16268
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16269
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 667]]
16270
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 656]]
16271
+ 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" = 656 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
16272
+  (0.2ms) SAVEPOINT active_record_1
16273
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 656]]
16274
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16275
+ 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" = 666 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16276
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16277
+  (0.1ms) SAVEPOINT active_record_1
16278
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 656]]
16279
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16280
+ 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" = 667 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16281
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16282
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16283
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 656 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16284
+  (0.2ms) SAVEPOINT active_record_1
16285
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'f5pWZTHtFQ2aMsKJ-v_s7w-c-lSgqXJL-jzg5LHYj5TQ' LIMIT 1
16286
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 656], ["target_type", "User"], ["token", "f5pWZTHtFQ2aMsKJ-v_s7w-c-lSgqXJL-jzg5LHYj5TQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16287
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16288
+
16289
+ Sent mail to user@example.com (19.0ms)
16290
+ Date: Thu, 09 Oct 2014 13:45:20 +1100
16291
+ From: please-change-me-at-config-initializers-notify-user@example.com
16292
+ To: user@example.com
16293
+ Message-ID: <5435f6c08d7f1_7dd3ff86c865bec479c4@wp.local.mail>
16294
+ Subject: New Notifications
16295
+ Mime-Version: 1.0
16296
+ Content-Type: text/html;
16297
+ charset=UTF-8
16298
+ Content-Transfer-Encoding: quoted-printable
16299
+
16300
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
16301
+ tml4/strict.dtd">
16302
+ <html>
16303
+ <head>
16304
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
16305
+ "/>
16306
+ <title></title>
16307
+ </head>
16308
+
16309
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
16310
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
16311
+ ing: optimizeLegibility;">
16312
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
16313
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
16314
+ Logo
16315
+ </div>
16316
+ </div>
16317
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
16318
+ ">
16319
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
16320
+ =
16321
+
16322
+ <div>
16323
+ New Post Notification happened. =
16324
+
16325
+ </div>
16326
+ <div>
16327
+ New Post Notification happened. =
16328
+
16329
+ </div>
16330
+
16331
+ </div>
16332
+ </div>
16333
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
16334
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
16335
+ <p style=3D"text-align: center;">
16336
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
16337
+ _unsubscribe?token=3Df5pWZTHtFQ2aMsKJ-v_s7w-c-lSgqXJL-jzg5LHYj5TQ&amp;typ=
16338
+ e=3DNewPostNotification">Unsubscribe</a>
16339
+ </p>
16340
+ <p style=3D"text-align: center;">
16341
+ This is the default generated layout. A privacy declaration could g=
16342
+ o here.
16343
+ </p>
16344
+ <p style=3D"text-align: center; margin-bottom: 0px;">
16345
+ =C2=A9 MyCompany Pty Ltd
16346
+ </p>
16347
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
16348
+ ABN 123 456 789
16349
+ </p>
16350
+ </div>
16351
+ </div>
16352
+ </body>
16353
+ </html>=
16354
+
16355
+  (0.4ms) ROLLBACK
16356
+  (0.2ms) BEGIN
16357
+  (0.2ms) SAVEPOINT active_record_1
16358
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16359
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16360
+  (0.2ms) SAVEPOINT active_record_1
16361
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16362
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 657], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16363
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16364
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 668]]
16365
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 657]]
16366
+ 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" = 657 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
16367
+  (0.3ms) SAVEPOINT active_record_1
16368
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 657]]
16369
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16370
+ 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" = 668 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16371
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16372
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 668 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16373
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 657]]
16374
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16375
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 657 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16376
+  (0.2ms) SAVEPOINT active_record_1
16377
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mGlK9tOKpYzvBl8XU0ZtKguldot5lWij00hM_dAeqaQQ' LIMIT 1
16378
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 657], ["target_type", "User"], ["token", "mGlK9tOKpYzvBl8XU0ZtKguldot5lWij00hM_dAeqaQQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16379
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16380
+
16381
+ Sent mail to user@example.com (5.7ms)
16382
+ Date: Thu, 09 Oct 2014 13:45:20 +1100
16383
+ From: please-change-me-at-config-initializers-notify-user@example.com
16384
+ To: user@example.com
16385
+ Message-ID: <5435f6c098e85_7dd3ff86c865bec48014@wp.local.mail>
16386
+ Subject: New Notification
16387
+ Mime-Version: 1.0
16388
+ Content-Type: text/html;
16389
+ charset=UTF-8
16390
+ Content-Transfer-Encoding: quoted-printable
16391
+
16392
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
16393
+ tml4/strict.dtd">
16394
+ <html>
16395
+ <head>
16396
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
16397
+ "/>
16398
+ <title></title>
16399
+ </head>
16400
+
16401
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
16402
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
16403
+ ing: optimizeLegibility;">
16404
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
16405
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
16406
+ Logo
16407
+ </div>
16408
+ </div>
16409
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
16410
+ ">
16411
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
16412
+ New Post Notification happened.
16413
+
16414
+ </div>
16415
+ </div>
16416
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
16417
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
16418
+ <p style=3D"text-align: center;">
16419
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
16420
+ _unsubscribe?token=3DmGlK9tOKpYzvBl8XU0ZtKguldot5lWij00hM_dAeqaQQ&amp;typ=
16421
+ e=3DNewPostNotification">Unsubscribe</a>
16422
+ </p>
16423
+ <p style=3D"text-align: center;">
16424
+ This is the default generated layout. A privacy declaration could g=
16425
+ o here.
16426
+ </p>
16427
+ <p style=3D"text-align: center; margin-bottom: 0px;">
16428
+ =C2=A9 MyCompany Pty Ltd
16429
+ </p>
16430
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
16431
+ ABN 123 456 789
16432
+ </p>
16433
+ </div>
16434
+ </div>
16435
+ </body>
16436
+ </html>=
16437
+
16438
+  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
16439
+  (0.3ms) ROLLBACK
16440
+  (0.1ms) BEGIN
16441
+  (0.2ms) SAVEPOINT active_record_1
16442
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16443
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16444
+  (0.1ms) SAVEPOINT active_record_1
16445
+ 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" = 658) LIMIT 1
16446
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 658], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16447
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16448
+  (0.3ms) SAVEPOINT active_record_1
16449
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16450
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
16451
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16452
+  (0.3ms) ROLLBACK
16453
+  (0.2ms) BEGIN
16454
+  (0.3ms) SAVEPOINT active_record_1
16455
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16456
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16457
+  (0.2ms) SAVEPOINT active_record_1
16458
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16459
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16460
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16461
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 669 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16462
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 659]]
16463
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16464
+  (0.2ms) ROLLBACK
16465
+  (0.3ms) BEGIN
16466
+  (0.2ms) SAVEPOINT active_record_1
16467
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16468
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16469
+  (0.2ms) SAVEPOINT active_record_1
16470
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16471
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16472
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16473
+  (0.2ms) SAVEPOINT active_record_1
16474
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16475
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16476
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16477
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 671]]
16478
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 660]]
16479
+ 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" = 660 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
16480
+  (0.2ms) SAVEPOINT active_record_1
16481
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 660]]
16482
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16483
+ SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 670 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16484
+  (0.4ms) RELEASE SAVEPOINT active_record_1
16485
+  (0.3ms) SAVEPOINT active_record_1
16486
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 660]]
16487
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16488
+ 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" = 671 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16489
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16490
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16491
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 660 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16492
+  (0.3ms) SAVEPOINT active_record_1
16493
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Js6uPX6J6cvDUfaOf_5-WgDE-PNy214qpyyGhuW0jZqA' LIMIT 1
16494
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 660], ["target_type", "User"], ["token", "Js6uPX6J6cvDUfaOf_5-WgDE-PNy214qpyyGhuW0jZqA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16495
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16496
+
16497
+ Sent mail to user@example.com (5.3ms)
16498
+ Date: Thu, 09 Oct 2014 13:45:20 +1100
16499
+ From: please-change-me-at-config-initializers-notify-user@example.com
16500
+ To: user@example.com
16501
+ Message-ID: <5435f6c0ac385_7dd3ff86c865bec481b8@wp.local.mail>
16502
+ Subject: New Notifications
16503
+ Mime-Version: 1.0
16504
+ Content-Type: text/html;
16505
+ charset=UTF-8
16506
+ Content-Transfer-Encoding: quoted-printable
16507
+
16508
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
16509
+ tml4/strict.dtd">
16510
+ <html>
16511
+ <head>
16512
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
16513
+ "/>
16514
+ <title></title>
16515
+ </head>
16516
+
16517
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
16518
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
16519
+ ing: optimizeLegibility;">
16520
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
16521
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
16522
+ Logo
16523
+ </div>
16524
+ </div>
16525
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
16526
+ ">
16527
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
16528
+ =
16529
+
16530
+ <div>
16531
+ New Post Notification happened. =
16532
+
16533
+ </div>
16534
+ <div>
16535
+ New Post Notification happened. =
16536
+
16537
+ </div>
16538
+
16539
+ </div>
16540
+ </div>
16541
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
16542
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
16543
+ <p style=3D"text-align: center;">
16544
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
16545
+ _unsubscribe?token=3DJs6uPX6J6cvDUfaOf_5-WgDE-PNy214qpyyGhuW0jZqA&amp;typ=
16546
+ e=3DNewPostNotification">Unsubscribe</a>
16547
+ </p>
16548
+ <p style=3D"text-align: center;">
16549
+ This is the default generated layout. A privacy declaration could g=
16550
+ o here.
16551
+ </p>
16552
+ <p style=3D"text-align: center; margin-bottom: 0px;">
16553
+ =C2=A9 MyCompany Pty Ltd
16554
+ </p>
16555
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
16556
+ ABN 123 456 789
16557
+ </p>
16558
+ </div>
16559
+ </div>
16560
+ </body>
16561
+ </html>=
16562
+
16563
+  (0.3ms) ROLLBACK
16564
+  (0.2ms) BEGIN
16565
+  (0.2ms) SAVEPOINT active_record_1
16566
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16567
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16568
+  (0.2ms) SAVEPOINT active_record_1
16569
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16570
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16571
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16572
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 672]]
16573
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]]
16574
+ 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" = 661 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
16575
+  (0.2ms) SAVEPOINT active_record_1
16576
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]]
16577
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16578
+ 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" = 672 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16579
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16580
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 672 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16581
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]]
16582
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16583
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 661 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16584
+  (0.2ms) SAVEPOINT active_record_1
16585
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gR2PDnEqXmqsynA0OJ6MPAVVvJT2xrTbkKL-iTarCabQ' LIMIT 1
16586
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 661], ["target_type", "User"], ["token", "gR2PDnEqXmqsynA0OJ6MPAVVvJT2xrTbkKL-iTarCabQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16587
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16588
+
16589
+ Sent mail to user@example.com (7.2ms)
16590
+ Date: Thu, 09 Oct 2014 13:45:20 +1100
16591
+ From: please-change-me-at-config-initializers-notify-user@example.com
16592
+ To: user@example.com
16593
+ Message-ID: <5435f6c0b5e31_7dd3ff86c865bec48254@wp.local.mail>
16594
+ Subject: New Notification
16595
+ Mime-Version: 1.0
16596
+ Content-Type: text/html;
16597
+ charset=UTF-8
16598
+ Content-Transfer-Encoding: quoted-printable
16599
+
16600
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
16601
+ tml4/strict.dtd">
16602
+ <html>
16603
+ <head>
16604
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
16605
+ "/>
16606
+ <title></title>
16607
+ </head>
16608
+
16609
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
16610
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
16611
+ ing: optimizeLegibility;">
16612
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
16613
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
16614
+ Logo
16615
+ </div>
16616
+ </div>
16617
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
16618
+ ">
16619
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
16620
+ New Post Notification happened.
16621
+
16622
+ </div>
16623
+ </div>
16624
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
16625
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
16626
+ <p style=3D"text-align: center;">
16627
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
16628
+ _unsubscribe?token=3DgR2PDnEqXmqsynA0OJ6MPAVVvJT2xrTbkKL-iTarCabQ&amp;typ=
16629
+ e=3DNewPostNotification">Unsubscribe</a>
16630
+ </p>
16631
+ <p style=3D"text-align: center;">
16632
+ This is the default generated layout. A privacy declaration could g=
16633
+ o here.
16634
+ </p>
16635
+ <p style=3D"text-align: center; margin-bottom: 0px;">
16636
+ =C2=A9 MyCompany Pty Ltd
16637
+ </p>
16638
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
16639
+ ABN 123 456 789
16640
+ </p>
16641
+ </div>
16642
+ </div>
16643
+ </body>
16644
+ </html>=
16645
+
16646
+  (0.5ms) ROLLBACK
16647
+  (0.2ms) BEGIN
16648
+  (0.3ms) SAVEPOINT active_record_1
16649
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16650
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16651
+  (0.2ms) SAVEPOINT active_record_1
16652
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16653
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16654
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16655
+  (0.2ms) SAVEPOINT active_record_1
16656
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16657
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16658
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16659
+  (0.2ms) SAVEPOINT active_record_1
16660
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16661
+ 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" = 673 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16662
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16663
+ NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 673 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16664
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 662]]
16665
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16666
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
16667
+  (0.3ms) ROLLBACK
16668
+  (0.2ms) BEGIN
16669
+  (0.2ms) SAVEPOINT active_record_1
16670
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16671
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16672
+  (0.3ms) SAVEPOINT active_record_1
16673
+ 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" = 663) LIMIT 1
16674
+ SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16675
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16676
+  (0.3ms) SAVEPOINT active_record_1
16677
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16678
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16679
+  (0.2ms) SAVEPOINT active_record_1
16680
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16681
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16682
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16683
+  (0.2ms) ROLLBACK
16684
+  (0.2ms) BEGIN
16685
+  (0.2ms) SAVEPOINT active_record_1
16686
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16687
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16688
+  (0.3ms) SAVEPOINT active_record_1
16689
+ NotifyUser::Unsubscribe Exists (1.2ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 664) LIMIT 1
16690
+ SQL (0.9ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 664], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16691
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16692
+  (0.2ms) SAVEPOINT active_record_1
16693
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16694
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 664], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16695
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16696
+  (0.3ms) SAVEPOINT active_record_1
16697
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16698
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16699
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16700
+  (0.3ms) SAVEPOINT active_record_1
16701
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16702
+ SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 674 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16703
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16704
+ NewPostNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 674 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16705
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 664]]
16706
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
16707
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
16708
+  (0.3ms) ROLLBACK
16709
+  (0.2ms) BEGIN
16710
+  (0.2ms) SAVEPOINT active_record_1
16711
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16712
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16713
+  (0.2ms) SAVEPOINT active_record_1
16714
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 665 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16715
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 665], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16716
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16717
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 665 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16718
+  (0.2ms) SAVEPOINT active_record_1
16719
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vLgMBRSKz-15ScaoKRtOVQZHvUBwdo9aiWIZJ6w59HEA' LIMIT 1
16720
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 665], ["target_type", "User"], ["token", "vLgMBRSKz-15ScaoKRtOVQZHvUBwdo9aiWIZJ6w59HEA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16721
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16722
+  (0.3ms) ROLLBACK
16723
+  (0.2ms) BEGIN
16724
+  (0.2ms) SAVEPOINT active_record_1
16725
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16726
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16727
+  (0.2ms) SAVEPOINT active_record_1
16728
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16729
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16730
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16731
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 666 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16732
+  (0.2ms) SAVEPOINT active_record_1
16733
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GqnQWRF1i8zem3bIAmRpWAKbpPbjTjdOVF_TpdEDI8Yw' LIMIT 1
16734
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 666], ["target_type", "User"], ["token", "GqnQWRF1i8zem3bIAmRpWAKbpPbjTjdOVF_TpdEDI8Yw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16735
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16736
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 666 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16737
+  (0.3ms) ROLLBACK
16738
+  (0.3ms) BEGIN
16739
+  (0.2ms) SAVEPOINT active_record_1
16740
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16741
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16742
+  (0.3ms) SAVEPOINT active_record_1
16743
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16744
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16745
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16746
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 667 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16747
+  (0.2ms) SAVEPOINT active_record_1
16748
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Eu_iBzaQ6lk5YwKZ-xMSVgmHE4pysyORaEFO-647GMDg' LIMIT 1
16749
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 667], ["target_type", "User"], ["token", "Eu_iBzaQ6lk5YwKZ-xMSVgmHE4pysyORaEFO-647GMDg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16750
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16751
+  (0.3ms) SAVEPOINT active_record_1
16752
+ SQL (1.0ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 193 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16753
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16754
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 667 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
16755
+  (0.3ms) SAVEPOINT active_record_1
16756
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8BiXYl_9mquRt5YNLPoTCw_x6aOQdDOJKp9RAngUfmfw' LIMIT 1
16757
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 667], ["target_type", "User"], ["token", "8BiXYl_9mquRt5YNLPoTCw_x6aOQdDOJKp9RAngUfmfw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16758
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16759
+  (0.2ms) ROLLBACK
16760
+  (0.2ms) BEGIN
16761
+  (0.2ms) SAVEPOINT active_record_1
16762
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16763
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16764
+  (0.3ms) SAVEPOINT active_record_1
16765
+ 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" = 668) LIMIT 1
16766
+ SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16767
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16768
+  (0.3ms) SAVEPOINT active_record_1
16769
+ NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 157 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 668) LIMIT 1
16770
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16771
+  (0.3ms) SAVEPOINT active_record_1
16772
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 668 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16773
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16774
+  (0.3ms) ROLLBACK
16775
+  (0.3ms) BEGIN
16776
+  (0.2ms) SAVEPOINT active_record_1
16777
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16778
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16779
+  (0.2ms) SAVEPOINT active_record_1
16780
+ 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" = 669) LIMIT 1
16781
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 669], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16782
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16783
+  (0.3ms) SAVEPOINT active_record_1
16784
+ NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 158 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 669) LIMIT 1
16785
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16786
+  (0.3ms) SAVEPOINT active_record_1
16787
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 669 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16788
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16789
+  (0.3ms) ROLLBACK
16790
+  (0.2ms) BEGIN
16791
+  (0.2ms) SAVEPOINT active_record_1
16792
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16793
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16794
+  (0.2ms) SAVEPOINT active_record_1
16795
+ 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" = 670) LIMIT 1
16796
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 670], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16797
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16798
+  (0.2ms) SAVEPOINT active_record_1
16799
+ NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 159 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 670) LIMIT 1
16800
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16801
+  (0.2ms) SAVEPOINT active_record_1
16802
+ NotifyUser::Unsubscribe Exists (1.1ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 670) LIMIT 1
16803
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
16804
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
16805
+  (0.2ms) ROLLBACK
16806
+  (0.2ms) BEGIN
16807
+  (0.2ms) SAVEPOINT active_record_1
16808
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16809
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16810
+  (0.2ms) SAVEPOINT active_record_1
16811
+ 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" = 671) LIMIT 1
16812
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 671], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16813
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16814
+  (0.3ms) SAVEPOINT active_record_1
16815
+ NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 160 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 671) LIMIT 1
16816
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16817
+  (0.3ms) SAVEPOINT active_record_1
16818
+ 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" = 671) LIMIT 1
16819
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
16820
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16821
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16822
+  (0.2ms) SAVEPOINT active_record_1
16823
+ SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 160]]
16824
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16825
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16826
+  (0.8ms) ROLLBACK
16827
+  (0.2ms) BEGIN
16828
+  (0.2ms) SAVEPOINT active_record_1
16829
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16830
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16831
+  (0.3ms) SAVEPOINT active_record_1
16832
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 672 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16833
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 672], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16834
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16835
+  (0.3ms) ROLLBACK
16836
+  (0.2ms) BEGIN
16837
+  (0.2ms) SAVEPOINT active_record_1
16838
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16839
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16840
+  (0.2ms) SAVEPOINT active_record_1
16841
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WHDH408QKbIGTfi9QGPwdAxvAoK_Go4ZkiIbo3Ztco4Q' LIMIT 1
16842
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 673], ["target_type", "User"], ["token", "WHDH408QKbIGTfi9QGPwdAxvAoK_Go4ZkiIbo3Ztco4Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16843
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16844
+  (0.2ms) SAVEPOINT active_record_1
16845
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16846
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WHDH408QKbIGTfi9QGPwdAxvAoK_Go4ZkiIbo3Ztco4Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
16847
+  (0.3ms) ROLLBACK
16848
+  (0.2ms) BEGIN
16849
+  (0.2ms) SAVEPOINT active_record_1
16850
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16851
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16852
+  (0.2ms) SAVEPOINT active_record_1
16853
+ NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OvF3GDjSYj2s4v6cpEvzQw4wISrizYwgasisxpmTBIeA' LIMIT 1
16854
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 674], ["target_type", "User"], ["token", "OvF3GDjSYj2s4v6cpEvzQw4wISrizYwgasisxpmTBIeA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16855
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16856
+  (0.2ms) SAVEPOINT active_record_1
16857
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16858
+  (0.2ms) SAVEPOINT active_record_1
16859
+ SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 196 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16860
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16861
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OvF3GDjSYj2s4v6cpEvzQw4wISrizYwgasisxpmTBIeA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
16862
+  (0.3ms) ROLLBACK
16863
+  (0.3ms) BEGIN
16864
+  (0.4ms) SAVEPOINT active_record_1
16865
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16866
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16867
+  (0.2ms) SAVEPOINT active_record_1
16868
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rkQCo9-XpUa1QTS_SKWyrAhbeIIlgUxF8GSj56vIlaow' LIMIT 1
16869
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 675], ["target_type", "User"], ["token", "rkQCo9-XpUa1QTS_SKWyrAhbeIIlgUxF8GSj56vIlaow"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
16870
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16871
+  (0.3ms) SAVEPOINT active_record_1
16872
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16873
+  (0.2ms) SAVEPOINT active_record_1
16874
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 197 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00]]
16875
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16876
+  (0.1ms) ROLLBACK
16877
+  (0.1ms) BEGIN
16878
+  (0.1ms) SAVEPOINT active_record_1
16879
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00]]
16880
+  (0.1ms) RELEASE SAVEPOINT active_record_1
16881
+  (0.2ms) SAVEPOINT active_record_1
16882
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_ucfRwO103DOCesXk1Tu_wIXCMOIZ_pkakYD6Zw2LvLw' LIMIT 1
16883
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00], ["target_id", 676], ["target_type", "User"], ["token", "_ucfRwO103DOCesXk1Tu_wIXCMOIZ_pkakYD6Zw2LvLw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00]]
16884
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16885
+  (0.2ms) SAVEPOINT active_record_1
16886
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16887
+  (0.2ms) ROLLBACK
16888
+  (0.2ms) BEGIN
16889
+  (0.2ms) ROLLBACK
16890
+  (0.2ms) BEGIN
16891
+  (0.2ms) ROLLBACK
16892
+  (0.1ms) BEGIN
16893
+  (0.2ms) ROLLBACK
16894
+  (0.3ms) BEGIN
16895
+  (0.2ms) ROLLBACK
16896
+  (0.2ms) BEGIN
16897
+  (0.3ms) ROLLBACK
16898
+  (0.2ms) BEGIN
16899
+  (0.2ms) ROLLBACK
16900
+  (0.2ms) BEGIN
16901
+  (0.2ms) ROLLBACK
16902
+  (0.3ms) BEGIN
16903
+  (0.2ms) SAVEPOINT active_record_1
16904
+ SQL (7.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16905
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16906
+ Processing by NotifyUser::NotificationsController#index as HTML
16907
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms)
16908
+ Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.0ms)
16909
+  (0.3ms) ROLLBACK
16910
+  (0.1ms) BEGIN
16911
+  (0.3ms) SAVEPOINT active_record_1
16912
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16913
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16914
+  (0.3ms) SAVEPOINT active_record_1
16915
+  (1.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16916
+ SQL (1.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16917
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16918
+ Processing by NotifyUser::NotificationsController#index as JSON
16919
+  (1.0ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 678 AND "notify_user_notifications"."target_type" = 'User'
16920
+ NotifyUser::BaseNotification Load (1.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 678 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
16921
+ Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.3ms)
16922
+  (0.5ms) ROLLBACK
16923
+  (0.3ms) BEGIN
16924
+  (0.3ms) SAVEPOINT active_record_1
16925
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16926
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16927
+  (0.2ms) SAVEPOINT active_record_1
16928
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16929
+ SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16930
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16931
+  (0.2ms) SAVEPOINT active_record_1
16932
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16933
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16934
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16935
+  (0.1ms) SAVEPOINT active_record_1
16936
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16937
+ SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16938
+  (0.3ms) RELEASE SAVEPOINT active_record_1
16939
+ Processing by NotifyUser::NotificationsController#index as HTML
16940
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 679 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
16941
+ Completed 200 OK in 47ms (Views: 45.4ms | ActiveRecord: 0.6ms)
16942
+  (0.3ms) ROLLBACK
16943
+  (0.1ms) BEGIN
16944
+  (0.2ms) SAVEPOINT active_record_1
16945
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16946
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16947
+  (0.1ms) SAVEPOINT active_record_1
16948
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16949
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16950
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16951
+  (0.1ms) SAVEPOINT active_record_1
16952
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16953
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16954
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16955
+  (0.1ms) SAVEPOINT active_record_1
16956
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16957
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16958
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16959
+ Processing by NotifyUser::NotificationsController#read as HTML
16960
+ Parameters: {"id"=>"683"}
16961
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 680 AND "notify_user_notifications"."target_type" = 'User' AND (id = '683') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16962
+  (0.2ms) SAVEPOINT active_record_1
16963
+ User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 680]]
16964
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16965
+ 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" = 683 [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
16966
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16967
+ Completed 200 OK in 19ms (Views: 1.8ms | ActiveRecord: 3.2ms)
16968
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 683 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16969
+  (0.6ms) ROLLBACK
16970
+  (0.1ms) BEGIN
16971
+  (0.2ms) SAVEPOINT active_record_1
16972
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
16973
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16974
+  (0.1ms) SAVEPOINT active_record_1
16975
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16976
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
16977
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16978
+  (0.1ms) SAVEPOINT active_record_1
16979
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16980
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
16981
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16982
+  (0.1ms) SAVEPOINT active_record_1
16983
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16984
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
16985
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16986
+ Processing by NotifyUser::NotificationsController#read as HTML
16987
+ Parameters: {"id"=>"686"}
16988
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 681 AND "notify_user_notifications"."target_type" = 'User' AND (id = '686') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16989
+  (0.2ms) SAVEPOINT active_record_1
16990
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 681]]
16991
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
16992
+ 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" = 686 [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
16993
+  (0.2ms) RELEASE SAVEPOINT active_record_1
16994
+ Completed 200 OK in 9ms (Views: 0.6ms | ActiveRecord: 2.8ms)
16995
+ Processing by NotifyUser::NotificationsController#read as HTML
16996
+ Parameters: {"id"=>"686"}
16997
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 681 AND "notify_user_notifications"."target_type" = 'User' AND (id = '686') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
16998
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.4ms)
16999
+  (0.3ms) ROLLBACK
17000
+  (0.1ms) BEGIN
17001
+  (0.2ms) SAVEPOINT active_record_1
17002
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17003
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17004
+  (0.2ms) SAVEPOINT active_record_1
17005
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17006
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17007
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17008
+  (0.3ms) SAVEPOINT active_record_1
17009
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17010
+ SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17011
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17012
+  (0.3ms) SAVEPOINT active_record_1
17013
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17014
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17015
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17016
+ Processing by NotifyUser::NotificationsController#mark_all as HTML
17017
+ SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 682 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))
17018
+ Redirected to http://test.host/notify_user/notifications
17019
+ Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
17020
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 682 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
17021
+  (0.3ms) ROLLBACK
17022
+  (0.2ms) BEGIN
17023
+  (0.3ms) SAVEPOINT active_record_1
17024
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17025
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17026
+  (0.2ms) SAVEPOINT active_record_1
17027
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 683 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17028
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 683], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17029
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17030
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
17031
+ Parameters: {"ids"=>["692"]}
17032
+ SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 683 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('692'))
17033
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 683 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('692'))
17034
+ Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 1.1ms)
17035
+ 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", 692]]
17036
+  (0.3ms) ROLLBACK
17037
+  (0.2ms) BEGIN
17038
+  (0.2ms) SAVEPOINT active_record_1
17039
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17040
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17041
+  (0.3ms) SAVEPOINT active_record_1
17042
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 684 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17043
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 684], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17044
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17045
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
17046
+ Parameters: {"ids"=>["693"]}
17047
+ SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 684 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('693'))
17048
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 684 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('693'))
17049
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 1.3ms)
17050
+  (0.3ms) ROLLBACK
17051
+  (0.2ms) BEGIN
17052
+  (0.2ms) SAVEPOINT active_record_1
17053
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17054
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17055
+  (0.2ms) SAVEPOINT active_record_1
17056
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17057
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17058
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17059
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17060
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
17061
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
17062
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17063
+  (0.4ms) SAVEPOINT active_record_1
17064
+ 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" = 685) LIMIT 1
17065
+ SQL (1.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17066
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17067
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17068
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17069
+ Completed 200 OK in 37ms (Views: 0.5ms | ActiveRecord: 5.0ms)
17070
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17071
+  (0.3ms) ROLLBACK
17072
+  (0.2ms) BEGIN
17073
+  (0.2ms) SAVEPOINT active_record_1
17074
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17075
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17076
+  (0.3ms) SAVEPOINT active_record_1
17077
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17078
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 686], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17079
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17080
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17081
+ Processing by NotifyUser::NotificationsController#subscriptions as HTML
17082
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
17083
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17084
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17085
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17086
+ Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 1.5ms)
17087
+ NotifyUser::Unsubscribe Load (0.8ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17088
+  (0.2ms) ROLLBACK
17089
+  (0.2ms) BEGIN
17090
+  (0.3ms) SAVEPOINT active_record_1
17091
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17092
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17093
+  (0.3ms) SAVEPOINT active_record_1
17094
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17095
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17096
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17097
+ Processing by NotifyUser::NotificationsController#unsubscribe as HTML
17098
+ Parameters: {"type"=>"NewPostNotification"}
17099
+  (0.3ms) SAVEPOINT active_record_1
17100
+ 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" = 687) LIMIT 1
17101
+ SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17102
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17103
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
17104
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17105
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17106
+ Completed 302 Found in 8ms (ActiveRecord: 2.7ms)
17107
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
17108
+  (0.2ms) ROLLBACK
17109
+  (0.2ms) BEGIN
17110
+  (0.3ms) SAVEPOINT active_record_1
17111
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17112
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17113
+  (0.2ms) SAVEPOINT active_record_1
17114
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17115
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17116
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17117
+  (0.2ms) SAVEPOINT active_record_1
17118
+ 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" = 688) LIMIT 1
17119
+ SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17120
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17121
+ Processing by NotifyUser::NotificationsController#subscribe as HTML
17122
+ Parameters: {"type"=>"NewPostNotification"}
17123
+ NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17124
+  (0.2ms) SAVEPOINT active_record_1
17125
+ SQL (0.7ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 163]]
17126
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17127
+ Redirected to http://test.host/notify_user/notifications/unsubscribe
17128
+ Completed 302 Found in 5ms (ActiveRecord: 1.7ms)
17129
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
17130
+  (0.2ms) ROLLBACK
17131
+  (0.2ms) BEGIN
17132
+  (0.2ms) SAVEPOINT active_record_1
17133
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17134
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17135
+  (0.2ms) SAVEPOINT active_record_1
17136
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 689 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17137
+ SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17138
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17139
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 689 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17140
+  (0.3ms) SAVEPOINT active_record_1
17141
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA' LIMIT 1
17142
+ SQL (1.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 689], ["target_type", "User"], ["token", "q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17143
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17144
+ Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
17145
+ Parameters: {"type"=>"NewPostNotification", "token"=>"q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA"}
17146
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
17147
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17148
+ User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 689]]
17149
+  (0.2ms) SAVEPOINT active_record_1
17150
+ 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" = 689) LIMIT 1
17151
+ SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17152
+  (0.4ms) RELEASE SAVEPOINT active_record_1
17153
+  (0.3ms) SAVEPOINT active_record_1
17154
+ SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 199 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17155
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17156
+ Completed 200 OK in 14ms (Views: 0.5ms | ActiveRecord: 5.2ms)
17157
+ NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1
17158
+  (0.3ms) ROLLBACK
17159
+  (0.2ms) BEGIN
17160
+ 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
17161
+  (0.2ms) SAVEPOINT active_record_1
17162
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17163
+ 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
17164
+  (0.2ms) SAVEPOINT active_record_1
17165
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17166
+  (0.3ms) ROLLBACK
17167
+  (0.2ms) BEGIN
17168
+ 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
17169
+  (0.3ms) SAVEPOINT active_record_1
17170
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17171
+ 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
17172
+  (0.2ms) SAVEPOINT active_record_1
17173
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
17174
+  (0.3ms) ROLLBACK
17175
+  (0.2ms) BEGIN
17176
+ 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
17177
+  (0.2ms) SAVEPOINT active_record_1
17178
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
17179
+ 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
17180
+  (0.2ms) SAVEPOINT active_record_1
17181
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17182
+  (0.3ms) ROLLBACK
17183
+  (0.2ms) BEGIN
17184
+  (0.3ms) SAVEPOINT active_record_1
17185
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17186
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17187
+  (0.2ms) SAVEPOINT active_record_1
17188
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 690 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17189
+ SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17190
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17191
+  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 690 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))
17192
+  (0.2ms) ROLLBACK
17193
+  (0.2ms) BEGIN
17194
+  (0.2ms) SAVEPOINT active_record_1
17195
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17196
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17197
+  (0.2ms) SAVEPOINT active_record_1
17198
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 691 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17199
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17200
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17201
+  (0.2ms) ROLLBACK
17202
+  (0.2ms) BEGIN
17203
+  (0.3ms) SAVEPOINT active_record_1
17204
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17205
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17206
+  (0.2ms) SAVEPOINT active_record_1
17207
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 692 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17208
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17209
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17210
+  (0.3ms) ROLLBACK
17211
+  (0.2ms) BEGIN
17212
+  (0.3ms) SAVEPOINT active_record_1
17213
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17214
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17215
+  (0.2ms) SAVEPOINT active_record_1
17216
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 693 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17217
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 693], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17218
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17219
+  (0.2ms) SAVEPOINT active_record_1
17220
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 693 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17221
+ 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" = 702 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17222
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17223
+ 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
17224
+  (0.2ms) ROLLBACK
17225
+  (0.2ms) BEGIN
17226
+  (0.2ms) SAVEPOINT active_record_1
17227
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17228
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17229
+  (0.2ms) SAVEPOINT active_record_1
17230
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17231
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17232
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17233
+  (0.2ms) SAVEPOINT active_record_1
17234
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17235
+ 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" = 703 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17236
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17237
+ 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
17238
+  (0.2ms) ROLLBACK
17239
+  (0.2ms) BEGIN
17240
+  (0.3ms) SAVEPOINT active_record_1
17241
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17242
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17243
+  (0.2ms) SAVEPOINT active_record_1
17244
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17245
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17246
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17247
+  (0.2ms) SAVEPOINT active_record_1
17248
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17249
+ 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" = 704 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17250
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17251
+ 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
17252
+  (0.3ms) ROLLBACK
17253
+  (0.2ms) BEGIN
17254
+  (0.2ms) SAVEPOINT active_record_1
17255
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17256
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17257
+  (0.2ms) SAVEPOINT active_record_1
17258
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17259
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17260
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17261
+  (0.3ms) SAVEPOINT active_record_1
17262
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17263
+ 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" = 705 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17264
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17265
+ 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
17266
+  (0.3ms) ROLLBACK
17267
+  (0.2ms) BEGIN
17268
+  (0.2ms) SAVEPOINT active_record_1
17269
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17270
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17271
+  (0.2ms) SAVEPOINT active_record_1
17272
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 697 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17273
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17274
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17275
+  (0.3ms) SAVEPOINT active_record_1
17276
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17277
+  (0.2ms) ROLLBACK
17278
+  (0.2ms) BEGIN
17279
+  (0.2ms) SAVEPOINT active_record_1
17280
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17281
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17282
+  (0.2ms) SAVEPOINT active_record_1
17283
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17284
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17285
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17286
+  (0.3ms) SAVEPOINT active_record_1
17287
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17288
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17289
+  (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" = 698 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 707)
17290
+ NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 707]]
17291
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 698]]
17292
+ 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" = 698 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
17293
+  (0.2ms) SAVEPOINT active_record_1
17294
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 698]]
17295
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17296
+ 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" = 707 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17297
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17298
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 707 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17299
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 698]]
17300
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17301
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 707 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17302
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 698]]
17303
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
17304
+  (0.3ms) ROLLBACK
17305
+  (0.2ms) BEGIN
17306
+  (0.2ms) SAVEPOINT active_record_1
17307
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17308
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17309
+  (0.3ms) SAVEPOINT active_record_1
17310
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17311
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 699], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17312
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17313
+  (0.2ms) SAVEPOINT active_record_1
17314
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17315
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17316
+  (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" = 699 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 708)
17317
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 708]]
17318
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]
17319
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 699 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
17320
+  (0.3ms) SAVEPOINT active_record_1
17321
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]
17322
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17323
+ 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" = 708 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17324
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17325
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 708 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17326
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]
17327
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17328
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 708 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17329
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]
17330
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
17331
+  (0.3ms) ROLLBACK
17332
+  (0.2ms) BEGIN
17333
+  (0.2ms) SAVEPOINT active_record_1
17334
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17335
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17336
+  (0.2ms) SAVEPOINT active_record_1
17337
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17338
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17339
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17340
+  (0.2ms) SAVEPOINT active_record_1
17341
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17342
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17343
+  (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" = 700 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 709)
17344
+  (0.2ms) SAVEPOINT active_record_1
17345
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17346
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17347
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17348
+  (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" = 700 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 710)
17349
+  (0.3ms) ROLLBACK
17350
+  (0.2ms) BEGIN
17351
+  (0.2ms) SAVEPOINT active_record_1
17352
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17353
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17354
+  (0.2ms) SAVEPOINT active_record_1
17355
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17356
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17357
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17358
+  (0.2ms) SAVEPOINT active_record_1
17359
+  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17360
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17361
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17362
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 712]]
17363
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 701]]
17364
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 701 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
17365
+  (0.2ms) SAVEPOINT active_record_1
17366
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 701]]
17367
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17368
+ 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" = 711 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17369
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17370
+  (0.2ms) SAVEPOINT active_record_1
17371
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 701]]
17372
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17373
+ 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" = 712 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17374
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17375
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17376
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 701 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17377
+  (0.3ms) SAVEPOINT active_record_1
17378
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mNrLW9-94Z5vvZ9fMV0VcAZJ4NVb7EAtPSr9-yYOcNlw' LIMIT 1
17379
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 701], ["target_type", "User"], ["token", "mNrLW9-94Z5vvZ9fMV0VcAZJ4NVb7EAtPSr9-yYOcNlw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17380
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17381
+
17382
+ Sent mail to user@example.com (9.9ms)
17383
+ Date: Thu, 09 Oct 2014 13:52:14 +1100
17384
+ From: please-change-me-at-config-initializers-notify-user@example.com
17385
+ To: user@example.com
17386
+ Message-ID: <5435f85e9bc1f_83a3fd47d865bf0709b6@wp.local.mail>
17387
+ Subject: New Notifications
17388
+ Mime-Version: 1.0
17389
+ Content-Type: text/html;
17390
+ charset=UTF-8
17391
+ Content-Transfer-Encoding: quoted-printable
17392
+
17393
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
17394
+ tml4/strict.dtd">
17395
+ <html>
17396
+ <head>
17397
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
17398
+ "/>
17399
+ <title></title>
17400
+ </head>
17401
+
17402
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
17403
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
17404
+ ing: optimizeLegibility;">
17405
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
17406
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
17407
+ Logo
17408
+ </div>
17409
+ </div>
17410
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
17411
+ ">
17412
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
17413
+ =
17414
+
17415
+ <div>
17416
+ New Post Notification happened. =
17417
+
17418
+ </div>
17419
+ <div>
17420
+ New Post Notification happened. =
17421
+
17422
+ </div>
17423
+
17424
+ </div>
17425
+ </div>
17426
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
17427
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
17428
+ <p style=3D"text-align: center;">
17429
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
17430
+ _unsubscribe?token=3DmNrLW9-94Z5vvZ9fMV0VcAZJ4NVb7EAtPSr9-yYOcNlw&amp;typ=
17431
+ e=3DNewPostNotification">Unsubscribe</a>
17432
+ </p>
17433
+ <p style=3D"text-align: center;">
17434
+ This is the default generated layout. A privacy declaration could g=
17435
+ o here.
17436
+ </p>
17437
+ <p style=3D"text-align: center; margin-bottom: 0px;">
17438
+ =C2=A9 MyCompany Pty Ltd
17439
+ </p>
17440
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
17441
+ ABN 123 456 789
17442
+ </p>
17443
+ </div>
17444
+ </div>
17445
+ </body>
17446
+ </html>=
17447
+
17448
+  (0.3ms) ROLLBACK
17449
+  (0.2ms) BEGIN
17450
+  (0.2ms) SAVEPOINT active_record_1
17451
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17452
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17453
+  (0.2ms) SAVEPOINT active_record_1
17454
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17455
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 702], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17456
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17457
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 713]]
17458
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 702]]
17459
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 702 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
17460
+  (0.3ms) SAVEPOINT active_record_1
17461
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 702]]
17462
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17463
+ 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" = 713 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17464
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17465
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 713 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17466
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 702]]
17467
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17468
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 702 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17469
+  (0.3ms) SAVEPOINT active_record_1
17470
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yhhGdzmuD5lmBl098WG4Rwl850q7ItiqH38q0U-zk54g' LIMIT 1
17471
+ SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 702], ["target_type", "User"], ["token", "yhhGdzmuD5lmBl098WG4Rwl850q7ItiqH38q0U-zk54g"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17472
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17473
+
17474
+ Sent mail to user@example.com (5.6ms)
17475
+ Date: Thu, 09 Oct 2014 13:52:14 +1100
17476
+ From: please-change-me-at-config-initializers-notify-user@example.com
17477
+ To: user@example.com
17478
+ Message-ID: <5435f85ea787b_83a3fd47d865bf0710a6@wp.local.mail>
17479
+ Subject: New Notification
17480
+ Mime-Version: 1.0
17481
+ Content-Type: text/html;
17482
+ charset=UTF-8
17483
+ Content-Transfer-Encoding: quoted-printable
17484
+
17485
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
17486
+ tml4/strict.dtd">
17487
+ <html>
17488
+ <head>
17489
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
17490
+ "/>
17491
+ <title></title>
17492
+ </head>
17493
+
17494
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
17495
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
17496
+ ing: optimizeLegibility;">
17497
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
17498
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
17499
+ Logo
17500
+ </div>
17501
+ </div>
17502
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
17503
+ ">
17504
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
17505
+ New Post Notification happened.
17506
+
17507
+ </div>
17508
+ </div>
17509
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
17510
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
17511
+ <p style=3D"text-align: center;">
17512
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
17513
+ _unsubscribe?token=3DyhhGdzmuD5lmBl098WG4Rwl850q7ItiqH38q0U-zk54g&amp;typ=
17514
+ e=3DNewPostNotification">Unsubscribe</a>
17515
+ </p>
17516
+ <p style=3D"text-align: center;">
17517
+ This is the default generated layout. A privacy declaration could g=
17518
+ o here.
17519
+ </p>
17520
+ <p style=3D"text-align: center; margin-bottom: 0px;">
17521
+ =C2=A9 MyCompany Pty Ltd
17522
+ </p>
17523
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
17524
+ ABN 123 456 789
17525
+ </p>
17526
+ </div>
17527
+ </div>
17528
+ </body>
17529
+ </html>=
17530
+
17531
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
17532
+  (0.3ms) ROLLBACK
17533
+  (0.2ms) BEGIN
17534
+  (0.2ms) SAVEPOINT active_record_1
17535
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17536
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17537
+  (0.2ms) SAVEPOINT active_record_1
17538
+ 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" = 703) LIMIT 1
17539
+ SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17540
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17541
+  (0.3ms) SAVEPOINT active_record_1
17542
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17543
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17544
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17545
+  (0.3ms) ROLLBACK
17546
+  (0.1ms) BEGIN
17547
+  (0.3ms) SAVEPOINT active_record_1
17548
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17549
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17550
+  (0.2ms) SAVEPOINT active_record_1
17551
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 704 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17552
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 704], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17553
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17554
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 714 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17555
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 704]]
17556
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 704 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17557
+  (0.3ms) ROLLBACK
17558
+  (0.2ms) BEGIN
17559
+  (0.2ms) SAVEPOINT active_record_1
17560
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17561
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17562
+  (0.2ms) SAVEPOINT active_record_1
17563
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17564
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17565
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17566
+  (0.2ms) SAVEPOINT active_record_1
17567
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17568
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17569
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17570
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 716]]
17571
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 705]]
17572
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 705 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
17573
+  (0.3ms) SAVEPOINT active_record_1
17574
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 705]]
17575
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17576
+ 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" = 715 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17577
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17578
+  (0.3ms) SAVEPOINT active_record_1
17579
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 705]]
17580
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17581
+ 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" = 716 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17582
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17583
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17584
+ NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 705 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17585
+  (0.2ms) SAVEPOINT active_record_1
17586
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Cb_K8FalA7rdLB0a8MHjSwAU64LhgRaHOXAPlJay6TfA' LIMIT 1
17587
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 705], ["target_type", "User"], ["token", "Cb_K8FalA7rdLB0a8MHjSwAU64LhgRaHOXAPlJay6TfA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17588
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17589
+
17590
+ Sent mail to user@example.com (5.6ms)
17591
+ Date: Thu, 09 Oct 2014 13:52:14 +1100
17592
+ From: please-change-me-at-config-initializers-notify-user@example.com
17593
+ To: user@example.com
17594
+ Message-ID: <5435f85ebbb37_83a3fd47d865bf07116@wp.local.mail>
17595
+ Subject: New Notifications
17596
+ Mime-Version: 1.0
17597
+ Content-Type: text/html;
17598
+ charset=UTF-8
17599
+ Content-Transfer-Encoding: quoted-printable
17600
+
17601
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
17602
+ tml4/strict.dtd">
17603
+ <html>
17604
+ <head>
17605
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
17606
+ "/>
17607
+ <title></title>
17608
+ </head>
17609
+
17610
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
17611
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
17612
+ ing: optimizeLegibility;">
17613
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
17614
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
17615
+ Logo
17616
+ </div>
17617
+ </div>
17618
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
17619
+ ">
17620
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
17621
+ =
17622
+
17623
+ <div>
17624
+ New Post Notification happened. =
17625
+
17626
+ </div>
17627
+ <div>
17628
+ New Post Notification happened. =
17629
+
17630
+ </div>
17631
+
17632
+ </div>
17633
+ </div>
17634
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
17635
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
17636
+ <p style=3D"text-align: center;">
17637
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
17638
+ _unsubscribe?token=3DCb_K8FalA7rdLB0a8MHjSwAU64LhgRaHOXAPlJay6TfA&amp;typ=
17639
+ e=3DNewPostNotification">Unsubscribe</a>
17640
+ </p>
17641
+ <p style=3D"text-align: center;">
17642
+ This is the default generated layout. A privacy declaration could g=
17643
+ o here.
17644
+ </p>
17645
+ <p style=3D"text-align: center; margin-bottom: 0px;">
17646
+ =C2=A9 MyCompany Pty Ltd
17647
+ </p>
17648
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
17649
+ ABN 123 456 789
17650
+ </p>
17651
+ </div>
17652
+ </div>
17653
+ </body>
17654
+ </html>=
17655
+
17656
+  (0.4ms) ROLLBACK
17657
+  (0.3ms) BEGIN
17658
+  (0.3ms) SAVEPOINT active_record_1
17659
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17660
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17661
+  (0.2ms) SAVEPOINT active_record_1
17662
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17663
+ SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 706], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17664
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17665
+ NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 717]]
17666
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 706]]
17667
+ NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 706 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
17668
+  (0.3ms) SAVEPOINT active_record_1
17669
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 706]]
17670
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17671
+ 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" = 717 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17672
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17673
+ NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 717 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17674
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 706]]
17675
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17676
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 706 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17677
+  (0.2ms) SAVEPOINT active_record_1
17678
+ NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iEjctGhyhtQukm4lAKhJowErALgaBRoGrAEbUku7TP-w' LIMIT 1
17679
+ SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 706], ["target_type", "User"], ["token", "iEjctGhyhtQukm4lAKhJowErALgaBRoGrAEbUku7TP-w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17680
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17681
+
17682
+ Sent mail to user@example.com (6.1ms)
17683
+ Date: Thu, 09 Oct 2014 13:52:14 +1100
17684
+ From: please-change-me-at-config-initializers-notify-user@example.com
17685
+ To: user@example.com
17686
+ Message-ID: <5435f85ec6524_83a3fd47d865bf0712ad@wp.local.mail>
17687
+ Subject: New Notification
17688
+ Mime-Version: 1.0
17689
+ Content-Type: text/html;
17690
+ charset=UTF-8
17691
+ Content-Transfer-Encoding: quoted-printable
17692
+
17693
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
17694
+ tml4/strict.dtd">
17695
+ <html>
17696
+ <head>
17697
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
17698
+ "/>
17699
+ <title></title>
17700
+ </head>
17701
+
17702
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
17703
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
17704
+ ing: optimizeLegibility;">
17705
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
17706
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
17707
+ Logo
17708
+ </div>
17709
+ </div>
17710
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
17711
+ ">
17712
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
17713
+ New Post Notification happened.
17714
+
17715
+ </div>
17716
+ </div>
17717
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
17718
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
17719
+ <p style=3D"text-align: center;">
17720
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
17721
+ _unsubscribe?token=3DiEjctGhyhtQukm4lAKhJowErALgaBRoGrAEbUku7TP-w&amp;typ=
17722
+ e=3DNewPostNotification">Unsubscribe</a>
17723
+ </p>
17724
+ <p style=3D"text-align: center;">
17725
+ This is the default generated layout. A privacy declaration could g=
17726
+ o here.
17727
+ </p>
17728
+ <p style=3D"text-align: center; margin-bottom: 0px;">
17729
+ =C2=A9 MyCompany Pty Ltd
17730
+ </p>
17731
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
17732
+ ABN 123 456 789
17733
+ </p>
17734
+ </div>
17735
+ </div>
17736
+ </body>
17737
+ </html>=
17738
+
17739
+  (0.4ms) ROLLBACK
17740
+  (0.2ms) BEGIN
17741
+  (0.2ms) SAVEPOINT active_record_1
17742
+ SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17743
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17744
+  (0.2ms) SAVEPOINT active_record_1
17745
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17746
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 707], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17747
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17748
+  (0.2ms) SAVEPOINT active_record_1
17749
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17750
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17751
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17752
+  (0.2ms) SAVEPOINT active_record_1
17753
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17754
+ 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" = 718 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17755
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17756
+ NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 718 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17757
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 707]]
17758
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17759
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
17760
+  (0.2ms) ROLLBACK
17761
+  (0.2ms) BEGIN
17762
+  (0.2ms) SAVEPOINT active_record_1
17763
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17764
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17765
+  (0.2ms) SAVEPOINT active_record_1
17766
+ 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" = 708) LIMIT 1
17767
+ SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 708], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17768
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17769
+  (0.2ms) SAVEPOINT active_record_1
17770
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17771
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17772
+  (0.3ms) SAVEPOINT active_record_1
17773
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17774
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
17775
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17776
+  (0.3ms) ROLLBACK
17777
+  (0.2ms) BEGIN
17778
+  (0.3ms) SAVEPOINT active_record_1
17779
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17780
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17781
+  (0.3ms) SAVEPOINT active_record_1
17782
+ 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" = 709) LIMIT 1
17783
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 709], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17784
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17785
+  (0.2ms) SAVEPOINT active_record_1
17786
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17787
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 709], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17788
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17789
+  (0.2ms) SAVEPOINT active_record_1
17790
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17791
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17792
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17793
+  (0.2ms) SAVEPOINT active_record_1
17794
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17795
+ 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" = 719 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17796
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17797
+ NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 719 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
17798
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 709]]
17799
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
17800
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
17801
+  (0.2ms) ROLLBACK
17802
+  (0.2ms) BEGIN
17803
+  (0.2ms) SAVEPOINT active_record_1
17804
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17805
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17806
+  (0.2ms) SAVEPOINT active_record_1
17807
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17808
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 710], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17809
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17810
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 710 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17811
+  (0.2ms) SAVEPOINT active_record_1
17812
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UiYSjcdz8ohqPnR8an8HmAcI3dJ2mtC8rEEn1iiAz2aw' LIMIT 1
17813
+ SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 710], ["target_type", "User"], ["token", "UiYSjcdz8ohqPnR8an8HmAcI3dJ2mtC8rEEn1iiAz2aw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17814
+  (0.4ms) RELEASE SAVEPOINT active_record_1
17815
+  (0.3ms) ROLLBACK
17816
+  (0.2ms) BEGIN
17817
+  (0.2ms) SAVEPOINT active_record_1
17818
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17819
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17820
+  (0.3ms) SAVEPOINT active_record_1
17821
+  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 711 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17822
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 711], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17823
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17824
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 711 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17825
+  (0.2ms) SAVEPOINT active_record_1
17826
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'k5ZirhYOjP1G91PQGeUnuwrFy-nuLnFu2Z4QR7ENo8TA' LIMIT 1
17827
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 711], ["target_type", "User"], ["token", "k5ZirhYOjP1G91PQGeUnuwrFy-nuLnFu2Z4QR7ENo8TA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17828
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17829
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 711 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17830
+  (0.3ms) ROLLBACK
17831
+  (0.2ms) BEGIN
17832
+  (0.2ms) SAVEPOINT active_record_1
17833
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17834
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17835
+  (0.3ms) SAVEPOINT active_record_1
17836
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 712 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17837
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 712], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17838
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17839
+ NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 712 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17840
+  (0.2ms) SAVEPOINT active_record_1
17841
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'F1wJFaWYjLXyHGZDtmYznAqyBTx3Max3Q5u0ho22Mz0w' LIMIT 1
17842
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 712], ["target_type", "User"], ["token", "F1wJFaWYjLXyHGZDtmYznAqyBTx3Max3Q5u0ho22Mz0w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17843
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17844
+  (0.2ms) SAVEPOINT active_record_1
17845
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 206 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17846
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17847
+ NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 712 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
17848
+  (0.3ms) SAVEPOINT active_record_1
17849
+ NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zTeDQCklx8pKv5gJaf6MKw1blHsAQKI32LeXxoG9wHMw' LIMIT 1
17850
+ SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 712], ["target_type", "User"], ["token", "zTeDQCklx8pKv5gJaf6MKw1blHsAQKI32LeXxoG9wHMw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17851
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17852
+  (0.3ms) ROLLBACK
17853
+  (0.2ms) BEGIN
17854
+  (0.2ms) SAVEPOINT active_record_1
17855
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17856
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17857
+  (0.2ms) SAVEPOINT active_record_1
17858
+ 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" = 713) LIMIT 1
17859
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 713], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17860
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17861
+  (0.3ms) SAVEPOINT active_record_1
17862
+ NotifyUser::Unsubscribe Exists (0.7ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 713) LIMIT 1
17863
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17864
+  (0.2ms) SAVEPOINT active_record_1
17865
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 713 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17866
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17867
+  (0.2ms) ROLLBACK
17868
+  (0.2ms) BEGIN
17869
+  (0.2ms) SAVEPOINT active_record_1
17870
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17871
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17872
+  (0.2ms) SAVEPOINT active_record_1
17873
+ 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" = 714) LIMIT 1
17874
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 714], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17875
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17876
+  (0.2ms) SAVEPOINT active_record_1
17877
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 169 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 714) LIMIT 1
17878
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17879
+  (0.3ms) SAVEPOINT active_record_1
17880
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 714 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17881
+  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1
17882
+  (0.2ms) ROLLBACK
17883
+  (0.2ms) BEGIN
17884
+  (0.2ms) SAVEPOINT active_record_1
17885
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17886
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17887
+  (0.2ms) SAVEPOINT active_record_1
17888
+ 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" = 715) LIMIT 1
17889
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 715], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17890
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17891
+  (0.2ms) SAVEPOINT active_record_1
17892
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 170 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 715) LIMIT 1
17893
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17894
+  (0.2ms) SAVEPOINT active_record_1
17895
+ NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 715) LIMIT 1
17896
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
17897
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
17898
+  (0.2ms) ROLLBACK
17899
+  (0.2ms) BEGIN
17900
+  (0.2ms) SAVEPOINT active_record_1
17901
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
17902
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17903
+  (0.2ms) SAVEPOINT active_record_1
17904
+ 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" = 716) LIMIT 1
17905
+ SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 716], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17906
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17907
+  (0.2ms) SAVEPOINT active_record_1
17908
+ NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 171 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 716) LIMIT 1
17909
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17910
+  (0.2ms) SAVEPOINT active_record_1
17911
+ 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" = 716) LIMIT 1
17912
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
17913
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17914
+ NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17915
+  (0.2ms) SAVEPOINT active_record_1
17916
+ SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 171]]
17917
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17918
+ NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17919
+  (0.2ms) ROLLBACK
17920
+  (0.1ms) BEGIN
17921
+  (0.2ms) SAVEPOINT active_record_1
17922
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17923
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17924
+  (0.2ms) SAVEPOINT active_record_1
17925
+  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
17926
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17927
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17928
+  (0.2ms) ROLLBACK
17929
+  (0.2ms) BEGIN
17930
+  (0.2ms) SAVEPOINT active_record_1
17931
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17932
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17933
+  (0.2ms) SAVEPOINT active_record_1
17934
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gTdZsiJxAdHzLx-dMgJSxg7G7PTfnZzsZtTFOEyQ92Eg' LIMIT 1
17935
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 718], ["target_type", "User"], ["token", "gTdZsiJxAdHzLx-dMgJSxg7G7PTfnZzsZtTFOEyQ92Eg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17936
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17937
+  (0.2ms) SAVEPOINT active_record_1
17938
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17939
+ NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gTdZsiJxAdHzLx-dMgJSxg7G7PTfnZzsZtTFOEyQ92Eg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
17940
+  (0.4ms) ROLLBACK
17941
+  (0.2ms) BEGIN
17942
+  (0.2ms) SAVEPOINT active_record_1
17943
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17944
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17945
+  (0.3ms) SAVEPOINT active_record_1
17946
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HPeDYZLMXJWAlyMq68BLiQB_i24iJEXut-3hEW1TZ1Ug' LIMIT 1
17947
+ SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 719], ["target_type", "User"], ["token", "HPeDYZLMXJWAlyMq68BLiQB_i24iJEXut-3hEW1TZ1Ug"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17948
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17949
+  (0.1ms) SAVEPOINT active_record_1
17950
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17951
+  (0.2ms) SAVEPOINT active_record_1
17952
+ SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 209 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17953
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17954
+ NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HPeDYZLMXJWAlyMq68BLiQB_i24iJEXut-3hEW1TZ1Ug' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
17955
+  (0.3ms) ROLLBACK
17956
+  (0.2ms) BEGIN
17957
+  (0.2ms) SAVEPOINT active_record_1
17958
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17959
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17960
+  (0.2ms) SAVEPOINT active_record_1
17961
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tvV2w9Fk91wU2oM24GvfdQSka-OBC4HkCcKeC2QpgKDg' LIMIT 1
17962
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 720], ["target_type", "User"], ["token", "tvV2w9Fk91wU2oM24GvfdQSka-OBC4HkCcKeC2QpgKDg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17963
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17964
+  (0.2ms) SAVEPOINT active_record_1
17965
+  (0.3ms) RELEASE SAVEPOINT active_record_1
17966
+  (0.2ms) SAVEPOINT active_record_1
17967
+ SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 210 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17968
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17969
+  (0.3ms) ROLLBACK
17970
+  (0.2ms) BEGIN
17971
+  (0.2ms) SAVEPOINT active_record_1
17972
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17973
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17974
+  (0.2ms) SAVEPOINT active_record_1
17975
+ NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1uhUvoRo3PqccyJy3jyuYQyBL1rBFsVmzmUpfdhqlZmA' LIMIT 1
17976
+ SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 721], ["target_type", "User"], ["token", "1uhUvoRo3PqccyJy3jyuYQyBL1rBFsVmzmUpfdhqlZmA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
17977
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17978
+  (0.2ms) SAVEPOINT active_record_1
17979
+  (0.2ms) RELEASE SAVEPOINT active_record_1
17980
+  (0.2ms) ROLLBACK
17981
+  (0.2ms) BEGIN
17982
+  (0.3ms) ROLLBACK
17983
+  (0.1ms) BEGIN
17984
+  (0.2ms) ROLLBACK
17985
+  (0.2ms) BEGIN
17986
+  (0.2ms) ROLLBACK
17987
+  (0.2ms) BEGIN
17988
+  (0.2ms) ROLLBACK
17989
+  (0.2ms) BEGIN
17990
+  (0.2ms) ROLLBACK
17991
+  (0.2ms) BEGIN
17992
+  (0.3ms) ROLLBACK
17993
+  (0.2ms) BEGIN
17994
+  (0.2ms) ROLLBACK