notify_user 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +12 -0
  4. data/app/assets/javascripts/notify_user/application.js +15 -0
  5. data/app/assets/stylesheets/notify_user/application.css +13 -0
  6. data/app/controllers/notify_user/notifications_controller.rb +33 -0
  7. data/app/helpers/notify_user/application_helper.rb +4 -0
  8. data/app/mailers/notify_user/notification_mailer.rb +28 -0
  9. data/app/models/notify_user/base_notification.rb +187 -0
  10. data/app/serializers/notify_user/notification_serializer.rb +15 -0
  11. data/app/views/layouts/notify_user/application.html.erb +14 -0
  12. data/app/views/notify_user/action_mailer/aggregate_notification.html.erb +5 -0
  13. data/app/views/notify_user/action_mailer/notification.html.erb +1 -0
  14. data/config/routes.rb +6 -0
  15. data/lib/generators/notify_user/install/USAGE +8 -0
  16. data/lib/generators/notify_user/install/install_generator.rb +28 -0
  17. data/lib/generators/notify_user/install/templates/initializer.rb +12 -0
  18. data/lib/generators/notify_user/install/templates/migration.rb +13 -0
  19. data/lib/generators/notify_user/notification/USAGE +8 -0
  20. data/lib/generators/notify_user/notification/notification_generator.rb +16 -0
  21. data/lib/generators/notify_user/notification/templates/email_layout_template.html.erb.erb +33 -0
  22. data/lib/generators/notify_user/notification/templates/email_template.html.erb.erb +1 -0
  23. data/lib/generators/notify_user/notification/templates/mobile_sdk_template.html.erb.erb +1 -0
  24. data/lib/generators/notify_user/notification/templates/notification.rb.erb +10 -0
  25. data/lib/notify_user/channels/action_mailer/action_mailer_channel.rb +24 -0
  26. data/lib/notify_user/engine.rb +11 -0
  27. data/lib/notify_user/version.rb +3 -0
  28. data/lib/notify_user.rb +26 -0
  29. data/spec/controllers/notify_user/notifications_controller_spec.rb +54 -0
  30. data/spec/dummy/rails-4.0.2/Gemfile +45 -0
  31. data/spec/dummy/rails-4.0.2/README.rdoc +28 -0
  32. data/spec/dummy/rails-4.0.2/Rakefile +6 -0
  33. data/spec/dummy/rails-4.0.2/app/assets/javascripts/application.js +16 -0
  34. data/spec/dummy/rails-4.0.2/app/assets/stylesheets/application.css +13 -0
  35. data/spec/dummy/rails-4.0.2/app/controllers/application_controller.rb +5 -0
  36. data/spec/dummy/rails-4.0.2/app/helpers/application_helper.rb +2 -0
  37. data/spec/dummy/rails-4.0.2/app/models/user.rb +2 -0
  38. data/spec/dummy/rails-4.0.2/app/notifications/new_post_notification.rb +10 -0
  39. data/spec/dummy/rails-4.0.2/app/views/layouts/application.html.erb +14 -0
  40. data/spec/dummy/rails-4.0.2/app/views/notify_user/layouts/action_mailer.html.erb +33 -0
  41. data/spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/action_mailer/notification.html.erb +1 -0
  42. data/spec/dummy/rails-4.0.2/app/views/notify_user/new_post_notification/mobile_sdk/notification.html.erb +1 -0
  43. data/spec/dummy/rails-4.0.2/bin/bundle +3 -0
  44. data/spec/dummy/rails-4.0.2/bin/rails +4 -0
  45. data/spec/dummy/rails-4.0.2/bin/rake +4 -0
  46. data/spec/dummy/rails-4.0.2/config/application.rb +23 -0
  47. data/spec/dummy/rails-4.0.2/config/boot.rb +4 -0
  48. data/spec/dummy/rails-4.0.2/config/database.yml +25 -0
  49. data/spec/dummy/rails-4.0.2/config/environment.rb +5 -0
  50. data/spec/dummy/rails-4.0.2/config/environments/development.rb +29 -0
  51. data/spec/dummy/rails-4.0.2/config/environments/production.rb +80 -0
  52. data/spec/dummy/rails-4.0.2/config/environments/test.rb +36 -0
  53. data/spec/dummy/rails-4.0.2/config/initializers/backtrace_silencers.rb +7 -0
  54. data/spec/dummy/rails-4.0.2/config/initializers/filter_parameter_logging.rb +4 -0
  55. data/spec/dummy/rails-4.0.2/config/initializers/inflections.rb +16 -0
  56. data/spec/dummy/rails-4.0.2/config/initializers/mime_types.rb +5 -0
  57. data/spec/dummy/rails-4.0.2/config/initializers/notify_user.rb +12 -0
  58. data/spec/dummy/rails-4.0.2/config/initializers/secret_token.rb +12 -0
  59. data/spec/dummy/rails-4.0.2/config/initializers/session_store.rb +3 -0
  60. data/spec/dummy/rails-4.0.2/config/initializers/wrap_parameters.rb +14 -0
  61. data/spec/dummy/rails-4.0.2/config/locales/en.yml +23 -0
  62. data/spec/dummy/rails-4.0.2/config/routes.rb +56 -0
  63. data/spec/dummy/rails-4.0.2/config.ru +4 -0
  64. data/spec/dummy/rails-4.0.2/db/migrate/20140105070446_create_users.rb +9 -0
  65. data/spec/dummy/rails-4.0.2/db/migrate/20140105070448_create_notify_user_notifications.rb +13 -0
  66. data/spec/dummy/rails-4.0.2/db/schema.rb +32 -0
  67. data/spec/dummy/rails-4.0.2/db/seeds.rb +7 -0
  68. data/spec/dummy/rails-4.0.2/db/test.sqlite3 +0 -0
  69. data/spec/dummy/rails-4.0.2/log/test.log +1701 -0
  70. data/spec/dummy/rails-4.0.2/public/404.html +58 -0
  71. data/spec/dummy/rails-4.0.2/public/422.html +58 -0
  72. data/spec/dummy/rails-4.0.2/public/500.html +57 -0
  73. data/spec/dummy/rails-4.0.2/public/favicon.ico +0 -0
  74. data/spec/dummy/rails-4.0.2/public/robots.txt +5 -0
  75. data/spec/dummy/rails-4.0.2/test/fixtures/users.yml +7 -0
  76. data/spec/dummy/rails-4.0.2/test/models/user_test.rb +7 -0
  77. data/spec/dummy/rails-4.0.2/test/test_helper.rb +15 -0
  78. data/spec/factories/notify_user_notifications.rb +10 -0
  79. data/spec/fixtures/notify_user/notification_mailer/notification_email +3 -0
  80. data/spec/mailers/notify_user/notification_mailer_spec.rb +31 -0
  81. data/spec/models/notify_user/notification_spec.rb +71 -0
  82. data/spec/serializers/notify_user/notification_serializer_spec.rb +10 -0
  83. data/spec/setup_spec.rb +17 -0
  84. data/spec/spec_helper.rb +46 -0
  85. data/spec/support/rails_template.rb +8 -0
  86. metadata +289 -0
@@ -0,0 +1,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails402::Application.initialize!
@@ -0,0 +1,29 @@
1
+ Rails402::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+ end
@@ -0,0 +1,80 @@
1
+ Rails402::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both thread web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+
42
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43
+ # config.force_ssl = true
44
+
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
47
+
48
+ # Prepend all log lines with the following tags.
49
+ # config.log_tags = [ :subdomain, :uuid ]
50
+
51
+ # Use a different logger for distributed setups.
52
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
53
+
54
+ # Use a different cache store in production.
55
+ # config.cache_store = :mem_cache_store
56
+
57
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
63
+
64
+ # Ignore bad email addresses and do not raise email delivery errors.
65
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
+ # config.action_mailer.raise_delivery_errors = false
67
+
68
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
+ # the I18n.default_locale when a translation can not be found).
70
+ config.i18n.fallbacks = true
71
+
72
+ # Send deprecation notices to registered listeners.
73
+ config.active_support.deprecation = :notify
74
+
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
78
+ # Use default logging formatter so that PID and timestamp are not suppressed.
79
+ config.log_formatter = ::Logger::Formatter.new
80
+ end
@@ -0,0 +1,36 @@
1
+ Rails402::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,12 @@
1
+ NotifyUser.setup do |config|
2
+
3
+ # Override the email address from which notifications appear to be sent.
4
+ config.mailer_sender = "please-change-me-at-config-initializers-notify-user@example.com"
5
+
6
+ # NotifyUser will call this within NotificationsController to ensure the user is authenticated.
7
+ config.authentication_method = :authenticate_user!
8
+
9
+ # NotifyUser will call this within NotificationsController to return the current logged in user.
10
+ config.current_user_method = :current_user
11
+
12
+ end
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Rails402::Application.config.secret_key_base = '021f371d4117b6d72fd53a8ccf152ab28c1238e749fbd3ad3d80b3c5d0ec09f0cdfae782950af846db2b53f0e54a063e84c32e96998688f507c139f98e3d6bab'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails402::Application.config.session_store :cookie_store, key: '_rails-4_0_2_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ Rails402::Application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,9 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :email
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ class CreateNotifyUserNotifications < ActiveRecord::Migration
2
+ def change
3
+ create_table :notify_user_notifications do |t|
4
+ t.string :type
5
+ t.integer :target_id
6
+ t.string :target_type
7
+ t.text :params
8
+ t.string :state
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,32 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140105070448) do
15
+
16
+ create_table "notify_user_notifications", force: true do |t|
17
+ t.string "type"
18
+ t.integer "target_id"
19
+ t.string "target_type"
20
+ t.text "params"
21
+ t.string "state"
22
+ t.datetime "created_at"
23
+ t.datetime "updated_at"
24
+ end
25
+
26
+ create_table "users", force: true do |t|
27
+ t.string "email"
28
+ t.datetime "created_at"
29
+ t.datetime "updated_at"
30
+ end
31
+
32
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
@@ -0,0 +1,1701 @@
1
+  (7.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateUsers (20140105070446)
5
+  (0.0ms) begin transaction
6
+  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "created_at" datetime, "updated_at" datetime) 
7
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140105070446"]]
8
+  (0.7ms) commit transaction
9
+ Migrating to CreateNotifyUserNotifications (20140105070448)
10
+  (0.0ms) begin transaction
11
+  (0.3ms) CREATE TABLE "notify_user_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar(255), "target_id" integer, "target_type" varchar(255), "params" text, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
12
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140105070448"]]
13
+  (0.6ms) commit transaction
14
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
15
+  (8.4ms) CREATE TABLE "notify_user_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar(255), "target_id" integer, "target_type" varchar(255), "params" text, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
16
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "created_at" datetime, "updated_at" datetime)
17
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
18
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
19
+  (0.1ms) SELECT version FROM "schema_migrations"
20
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140105070448')
21
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140105070446')
22
+  (0.5ms) begin transaction
23
+  (0.1ms) SAVEPOINT active_record_1
24
+ SQL (2.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
25
+  (0.1ms) RELEASE SAVEPOINT active_record_1
26
+ Processing by NotifyUser::NotificationsController#index as HTML
27
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
28
+ Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.5ms)
29
+  (0.4ms) rollback transaction
30
+  (0.2ms) begin transaction
31
+  (0.1ms) SAVEPOINT active_record_1
32
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
33
+  (0.1ms) RELEASE SAVEPOINT active_record_1
34
+  (0.1ms) SAVEPOINT active_record_1
35
+ SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
36
+  (0.1ms) RELEASE SAVEPOINT active_record_1
37
+ Processing by NotifyUser::NotificationsController#index as HTML
38
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
39
+ Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.2ms)
40
+  (0.4ms) rollback transaction
41
+  (0.1ms) begin transaction
42
+  (0.0ms) SAVEPOINT active_record_1
43
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
44
+  (0.0ms) RELEASE SAVEPOINT active_record_1
45
+  (0.0ms) SAVEPOINT active_record_1
46
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
47
+  (0.0ms) RELEASE SAVEPOINT active_record_1
48
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
49
+ Parameters: {"ids"=>["1"]}
50
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
51
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
52
+ Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.5ms)
53
+ NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
54
+  (0.4ms) rollback transaction
55
+  (0.1ms) begin transaction
56
+  (0.1ms) SAVEPOINT active_record_1
57
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
58
+  (0.0ms) RELEASE SAVEPOINT active_record_1
59
+  (0.1ms) SAVEPOINT active_record_1
60
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
61
+  (0.0ms) RELEASE SAVEPOINT active_record_1
62
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
63
+ Parameters: {"ids"=>["1"]}
64
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
65
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
66
+ Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.4ms)
67
+  (0.4ms) rollback transaction
68
+  (0.0ms) begin transaction
69
+  (0.1ms) rollback transaction
70
+  (0.1ms) begin transaction
71
+  (0.1ms) rollback transaction
72
+  (0.0ms) begin transaction
73
+  (0.1ms) rollback transaction
74
+  (0.0ms) begin transaction
75
+  (0.0ms) SAVEPOINT active_record_1
76
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
77
+  (0.0ms) RELEASE SAVEPOINT active_record_1
78
+  (0.0ms) SAVEPOINT active_record_1
79
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
80
+  (0.1ms) RELEASE SAVEPOINT active_record_1
81
+  (0.1ms) SAVEPOINT active_record_1
82
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
83
+  (0.5ms) rollback transaction
84
+  (0.1ms) begin transaction
85
+  (0.0ms) SAVEPOINT active_record_1
86
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
87
+  (0.0ms) RELEASE SAVEPOINT active_record_1
88
+  (0.0ms) SAVEPOINT active_record_1
89
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
90
+  (0.0ms) RELEASE SAVEPOINT active_record_1
91
+  (0.0ms) SAVEPOINT active_record_1
92
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
93
+  (0.0ms) RELEASE SAVEPOINT active_record_1
94
+  (0.1ms) 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" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
95
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
96
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
97
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
98
+  (0.1ms) SAVEPOINT active_record_1
99
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
100
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
101
+  (0.0ms) RELEASE SAVEPOINT active_record_1
102
+  (0.0ms) SAVEPOINT active_record_1
103
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
104
+  (0.1ms) RELEASE SAVEPOINT active_record_1
105
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
106
+  (0.3ms) rollback transaction
107
+  (0.0ms) begin transaction
108
+  (0.0ms) SAVEPOINT active_record_1
109
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
110
+  (0.1ms) RELEASE SAVEPOINT active_record_1
111
+  (0.1ms) SAVEPOINT active_record_1
112
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
113
+  (0.1ms) RELEASE SAVEPOINT active_record_1
114
+  (0.0ms) SAVEPOINT active_record_1
115
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
116
+  (0.0ms) RELEASE SAVEPOINT active_record_1
117
+  (0.1ms) 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" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
118
+  (0.1ms) SAVEPOINT active_record_1
119
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
120
+  (0.1ms) RELEASE SAVEPOINT active_record_1
121
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2)
122
+  (0.3ms) rollback transaction
123
+  (0.1ms) begin transaction
124
+  (0.0ms) SAVEPOINT active_record_1
125
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
126
+  (0.0ms) RELEASE SAVEPOINT active_record_1
127
+  (0.0ms) SAVEPOINT active_record_1
128
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
129
+  (0.0ms) RELEASE SAVEPOINT active_record_1
130
+  (0.0ms) SAVEPOINT active_record_1
131
+ SQL (0.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
132
+  (0.0ms) RELEASE SAVEPOINT active_record_1
133
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 2]]
134
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
135
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
136
+  (0.0ms) SAVEPOINT active_record_1
137
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
138
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
139
+  (0.0ms) RELEASE SAVEPOINT active_record_1
140
+  (0.0ms) SAVEPOINT active_record_1
141
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
142
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
143
+  (0.0ms) RELEASE SAVEPOINT active_record_1
144
+  (0.1ms) SAVEPOINT active_record_1
145
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
146
+  (0.0ms) RELEASE SAVEPOINT active_record_1
147
+  (0.0ms) SAVEPOINT active_record_1
148
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
149
+  (0.0ms) RELEASE SAVEPOINT active_record_1
150
+
151
+ Sent mail to user@example.com (7.0ms)
152
+ Date: Sun, 05 Jan 2014 18:04:53 +1100
153
+ From: please-change-me-at-config-initializers-notify-user@example.com
154
+ To: user@example.com
155
+ Message-ID: <52c90415e9f5c_68dd8082dbf8634e1@tomass-air-11.mail>
156
+ Subject: Rails402: You have new Newpostnotification notifications.
157
+ Mime-Version: 1.0
158
+ Content-Type: text/html;
159
+ charset=UTF-8
160
+ Content-Transfer-Encoding: 7bit
161
+ layout-name: action_mailer
162
+ layout-path: notify_user/layouts
163
+
164
+ <div>
165
+ New Post Notification happened.
166
+ </div>
167
+ <div>
168
+ New Post Notification happened.
169
+ </div>
170
+
171
+  (0.4ms) rollback transaction
172
+  (0.0ms) begin transaction
173
+  (0.1ms) SAVEPOINT active_record_1
174
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
175
+  (0.0ms) RELEASE SAVEPOINT active_record_1
176
+  (0.0ms) SAVEPOINT active_record_1
177
+ SQL (1.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00]]
178
+  (0.1ms) RELEASE SAVEPOINT active_record_1
179
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
180
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
181
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
182
+  (0.1ms) SAVEPOINT active_record_1
183
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
184
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
185
+  (0.1ms) RELEASE SAVEPOINT active_record_1
186
+  (0.0ms) SAVEPOINT active_record_1
187
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:04:53 UTC +00:00], ["params", "--- {}\n"]]
188
+  (0.0ms) RELEASE SAVEPOINT active_record_1
189
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
190
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
191
+
192
+ Sent mail to user@example.com (6.2ms)
193
+ Date: Sun, 05 Jan 2014 18:04:53 +1100
194
+ From: please-change-me-at-config-initializers-notify-user@example.com
195
+ To: user@example.com
196
+ Message-ID: <52c90415f1b80_68dd8082dbf8635d@tomass-air-11.mail>
197
+ Subject: Rails402: You have a new Newpostnotification notification.
198
+ Mime-Version: 1.0
199
+ Content-Type: text/html;
200
+ charset=UTF-8
201
+ Content-Transfer-Encoding: 7bit
202
+ layout-name: action_mailer
203
+ layout-path: notify_user/layouts
204
+
205
+ New Post Notification happened.
206
+  (0.8ms) rollback transaction
207
+  (0.1ms) begin transaction
208
+  (0.0ms) rollback transaction
209
+  (0.0ms) begin transaction
210
+  (0.0ms) rollback transaction
211
+  (0.0ms) begin transaction
212
+  (0.0ms) rollback transaction
213
+  (0.0ms) begin transaction
214
+  (0.0ms) rollback transaction
215
+  (0.0ms) begin transaction
216
+  (0.0ms) rollback transaction
217
+  (0.0ms) begin transaction
218
+  (0.1ms) rollback transaction
219
+  (0.1ms) begin transaction
220
+  (0.0ms) rollback transaction
221
+  (0.4ms) begin transaction
222
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.3ms)
223
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (1.9ms)
224
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
225
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (0.5ms)
226
+  (0.1ms) rollback transaction
227
+  (0.3ms) begin transaction
228
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.2ms)
229
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (1.7ms)
230
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
231
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (0.5ms)
232
+  (0.1ms) rollback transaction
233
+  (0.3ms) begin transaction
234
+  (0.1ms) rollback transaction
235
+  (0.3ms) begin transaction
236
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.3ms)
237
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (1.7ms)
238
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
239
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (0.5ms)
240
+  (0.1ms) rollback transaction
241
+  (0.3ms) begin transaction
242
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.2ms)
243
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (1.8ms)
244
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
245
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb (0.6ms)
246
+  (0.1ms) rollback transaction
247
+  (0.3ms) begin transaction
248
+  (0.1ms) rollback transaction
249
+  (0.2ms) begin transaction
250
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.2ms)
251
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb within notify_user/layouts/action_mailer (1.8ms)
252
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
253
+ Rendered /Users/tomas/Work/Papercloud/notify_user/app/views/notify_user/action_mailer/notification.html.erb within notify_user/layouts/action_mailer (0.5ms)
254
+  (0.1ms) rollback transaction
255
+  (0.4ms) begin transaction
256
+  (0.1ms) SAVEPOINT active_record_1
257
+ SQL (5.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
258
+  (0.1ms) RELEASE SAVEPOINT active_record_1
259
+ Processing by NotifyUser::NotificationsController#index as HTML
260
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
261
+ Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.7ms)
262
+  (0.5ms) rollback transaction
263
+  (0.0ms) begin transaction
264
+  (0.0ms) SAVEPOINT active_record_1
265
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
266
+  (0.0ms) RELEASE SAVEPOINT active_record_1
267
+  (0.1ms) SAVEPOINT active_record_1
268
+ SQL (1.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
269
+  (0.1ms) RELEASE SAVEPOINT active_record_1
270
+ Processing by NotifyUser::NotificationsController#index as HTML
271
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
272
+ Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.2ms)
273
+  (0.5ms) rollback transaction
274
+  (0.1ms) begin transaction
275
+  (0.1ms) SAVEPOINT active_record_1
276
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
277
+  (0.0ms) RELEASE SAVEPOINT active_record_1
278
+  (0.1ms) SAVEPOINT active_record_1
279
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
280
+  (0.0ms) RELEASE SAVEPOINT active_record_1
281
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
282
+ Parameters: {"ids"=>["1"]}
283
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
284
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
285
+ Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.2ms)
286
+ NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
287
+  (0.4ms) rollback transaction
288
+  (0.1ms) begin transaction
289
+  (0.0ms) SAVEPOINT active_record_1
290
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
291
+  (0.0ms) RELEASE SAVEPOINT active_record_1
292
+  (0.0ms) SAVEPOINT active_record_1
293
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
294
+  (0.1ms) RELEASE SAVEPOINT active_record_1
295
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
296
+ Parameters: {"ids"=>["1"]}
297
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
298
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
299
+ Completed 200 OK in 4ms (Views: 2.4ms | ActiveRecord: 0.4ms)
300
+  (0.5ms) rollback transaction
301
+  (0.1ms) begin transaction
302
+  (0.1ms) rollback transaction
303
+  (0.1ms) begin transaction
304
+  (0.1ms) rollback transaction
305
+  (0.1ms) begin transaction
306
+  (0.1ms) rollback transaction
307
+  (0.1ms) begin transaction
308
+  (0.0ms) SAVEPOINT active_record_1
309
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
310
+  (0.0ms) RELEASE SAVEPOINT active_record_1
311
+  (0.0ms) SAVEPOINT active_record_1
312
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
313
+  (0.0ms) RELEASE SAVEPOINT active_record_1
314
+  (0.1ms) SAVEPOINT active_record_1
315
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
316
+  (0.5ms) rollback transaction
317
+  (0.1ms) begin transaction
318
+  (0.1ms) SAVEPOINT active_record_1
319
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
320
+  (0.0ms) RELEASE SAVEPOINT active_record_1
321
+  (0.0ms) SAVEPOINT active_record_1
322
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
323
+  (0.0ms) RELEASE SAVEPOINT active_record_1
324
+  (0.0ms) SAVEPOINT active_record_1
325
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
326
+  (0.1ms) RELEASE SAVEPOINT active_record_1
327
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
328
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
329
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
330
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
331
+  (0.0ms) SAVEPOINT active_record_1
332
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
333
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
334
+  (0.0ms) RELEASE SAVEPOINT active_record_1
335
+  (0.0ms) SAVEPOINT active_record_1
336
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
337
+  (0.0ms) RELEASE SAVEPOINT active_record_1
338
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
339
+  (0.5ms) rollback transaction
340
+  (0.0ms) begin transaction
341
+  (0.1ms) SAVEPOINT active_record_1
342
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
343
+  (0.1ms) RELEASE SAVEPOINT active_record_1
344
+  (0.0ms) SAVEPOINT active_record_1
345
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
346
+  (0.0ms) RELEASE SAVEPOINT active_record_1
347
+  (0.0ms) SAVEPOINT active_record_1
348
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
350
+  (0.1ms) 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" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
351
+  (0.0ms) SAVEPOINT active_record_1
352
+ SQL (0.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
353
+  (0.0ms) RELEASE SAVEPOINT active_record_1
354
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2)
355
+  (0.4ms) rollback transaction
356
+  (0.0ms) begin transaction
357
+  (0.0ms) SAVEPOINT active_record_1
358
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
359
+  (0.0ms) RELEASE SAVEPOINT active_record_1
360
+  (0.1ms) SAVEPOINT active_record_1
361
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
362
+  (0.1ms) RELEASE SAVEPOINT active_record_1
363
+  (0.1ms) SAVEPOINT active_record_1
364
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
365
+  (0.0ms) RELEASE SAVEPOINT active_record_1
366
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 2]]
367
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
368
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
369
+  (0.0ms) SAVEPOINT active_record_1
370
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
371
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
372
+  (0.0ms) RELEASE SAVEPOINT active_record_1
373
+  (0.0ms) SAVEPOINT active_record_1
374
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
375
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
377
+  (0.0ms) SAVEPOINT active_record_1
378
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
380
+  (0.0ms) SAVEPOINT active_record_1
381
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
382
+  (0.0ms) RELEASE SAVEPOINT active_record_1
383
+
384
+ Sent mail to user@example.com (8.4ms)
385
+ Date: Sun, 05 Jan 2014 18:16:13 +1100
386
+ From: please-change-me-at-config-initializers-notify-user@example.com
387
+ To: user@example.com
388
+ Message-ID: <52c906bd9e1d1_69db8082dbf848758@tomass-air-11.mail>
389
+ Subject: Rails402: You have new Newpostnotification notifications.
390
+ Mime-Version: 1.0
391
+ Content-Type: text/html;
392
+ charset=UTF-8
393
+ Content-Transfer-Encoding: quoted-printable
394
+
395
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
396
+ tml4/strict.dtd">
397
+ <html>
398
+ <head>
399
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
400
+ "/>
401
+ <title></title>
402
+ </head>
403
+
404
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
405
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
406
+ ing: optimizeLegibility;">
407
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
408
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
409
+ Logo
410
+ </div>
411
+ </div>
412
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
413
+ ">
414
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
415
+ <div>
416
+ New Post Notification happened. =
417
+
418
+ </div>
419
+ <div>
420
+ New Post Notification happened. =
421
+
422
+ </div>
423
+
424
+ </div>
425
+ </div>
426
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
427
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
428
+ <p style=3D"text-align: center;">
429
+ This is the default generated layout. A privacy declaration could g=
430
+ o here.
431
+ </p>
432
+ <p style=3D"text-align: center; margin-bottom: 0px;">
433
+ =C2=A9 MyCompany Pty Ltd
434
+ </p>
435
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
436
+ ABN 123 456 789
437
+ </p>
438
+ </div>
439
+ </div>
440
+ </body>
441
+ </html>=
442
+
443
+  (0.4ms) rollback transaction
444
+  (0.1ms) begin transaction
445
+  (0.0ms) SAVEPOINT active_record_1
446
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
447
+  (0.1ms) RELEASE SAVEPOINT active_record_1
448
+  (0.1ms) SAVEPOINT active_record_1
449
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00]]
450
+  (0.0ms) RELEASE SAVEPOINT active_record_1
451
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
452
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
453
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
454
+  (0.0ms) SAVEPOINT active_record_1
455
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
456
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
457
+  (0.1ms) RELEASE SAVEPOINT active_record_1
458
+  (0.0ms) SAVEPOINT active_record_1
459
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 07:16:13 UTC +00:00], ["params", "--- {}\n"]]
460
+  (0.0ms) RELEASE SAVEPOINT active_record_1
461
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
462
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
463
+
464
+ Sent mail to user@example.com (5.7ms)
465
+ Date: Sun, 05 Jan 2014 18:16:13 +1100
466
+ From: please-change-me-at-config-initializers-notify-user@example.com
467
+ To: user@example.com
468
+ Message-ID: <52c906bda4d58_69db8082dbf8488fe@tomass-air-11.mail>
469
+ Subject: Rails402: You have a new Newpostnotification notification.
470
+ Mime-Version: 1.0
471
+ Content-Type: text/html;
472
+ charset=UTF-8
473
+ Content-Transfer-Encoding: quoted-printable
474
+
475
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
476
+ tml4/strict.dtd">
477
+ <html>
478
+ <head>
479
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
480
+ "/>
481
+ <title></title>
482
+ </head>
483
+
484
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
485
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
486
+ ing: optimizeLegibility;">
487
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
488
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
489
+ Logo
490
+ </div>
491
+ </div>
492
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
493
+ ">
494
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
495
+ New Post Notification happened.
496
+ </div>
497
+ </div>
498
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
499
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
500
+ <p style=3D"text-align: center;">
501
+ This is the default generated layout. A privacy declaration could g=
502
+ o here.
503
+ </p>
504
+ <p style=3D"text-align: center; margin-bottom: 0px;">
505
+ =C2=A9 MyCompany Pty Ltd
506
+ </p>
507
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
508
+ ABN 123 456 789
509
+ </p>
510
+ </div>
511
+ </div>
512
+ </body>
513
+ </html>=
514
+
515
+  (0.5ms) rollback transaction
516
+  (0.1ms) begin transaction
517
+  (0.1ms) rollback transaction
518
+  (0.1ms) begin transaction
519
+  (0.1ms) rollback transaction
520
+  (0.1ms) begin transaction
521
+  (0.0ms) rollback transaction
522
+  (0.0ms) begin transaction
523
+  (0.0ms) rollback transaction
524
+  (0.1ms) begin transaction
525
+  (0.0ms) rollback transaction
526
+  (0.0ms) begin transaction
527
+  (0.0ms) rollback transaction
528
+  (0.0ms) begin transaction
529
+  (0.0ms) rollback transaction
530
+  (0.3ms) begin transaction
531
+  (0.1ms) SAVEPOINT active_record_1
532
+ SQL (4.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
533
+  (0.1ms) RELEASE SAVEPOINT active_record_1
534
+ Processing by NotifyUser::NotificationsController#index as HTML
535
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
536
+ Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.4ms)
537
+  (0.4ms) rollback transaction
538
+  (0.1ms) begin transaction
539
+  (0.1ms) SAVEPOINT active_record_1
540
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
541
+  (0.1ms) RELEASE SAVEPOINT active_record_1
542
+  (0.1ms) SAVEPOINT active_record_1
543
+ SQL (1.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
544
+  (0.1ms) RELEASE SAVEPOINT active_record_1
545
+ Processing by NotifyUser::NotificationsController#index as HTML
546
+ NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
547
+ Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.4ms)
548
+  (0.4ms) rollback transaction
549
+  (0.0ms) begin transaction
550
+  (0.0ms) SAVEPOINT active_record_1
551
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
552
+  (0.0ms) RELEASE SAVEPOINT active_record_1
553
+  (0.1ms) SAVEPOINT active_record_1
554
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
555
+  (0.0ms) RELEASE SAVEPOINT active_record_1
556
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
557
+ Parameters: {"ids"=>["1"]}
558
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
559
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
560
+ Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.3ms)
561
+ NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
562
+  (0.4ms) rollback transaction
563
+  (0.1ms) begin transaction
564
+  (0.1ms) SAVEPOINT active_record_1
565
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
566
+  (0.1ms) RELEASE SAVEPOINT active_record_1
567
+  (0.1ms) SAVEPOINT active_record_1
568
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
569
+  (0.0ms) RELEASE SAVEPOINT active_record_1
570
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
571
+ Parameters: {"ids"=>["1"]}
572
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
573
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
574
+ Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.3ms)
575
+  (0.4ms) rollback transaction
576
+  (0.1ms) begin transaction
577
+  (0.1ms) rollback transaction
578
+  (0.1ms) begin transaction
579
+  (0.1ms) rollback transaction
580
+  (0.0ms) begin transaction
581
+  (0.1ms) rollback transaction
582
+  (0.0ms) begin transaction
583
+  (0.0ms) SAVEPOINT active_record_1
584
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
585
+  (0.0ms) RELEASE SAVEPOINT active_record_1
586
+  (0.0ms) SAVEPOINT active_record_1
587
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
588
+  (0.0ms) RELEASE SAVEPOINT active_record_1
589
+  (0.0ms) SAVEPOINT active_record_1
590
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
591
+  (0.4ms) rollback transaction
592
+  (0.1ms) begin transaction
593
+  (0.1ms) SAVEPOINT active_record_1
594
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
595
+  (0.0ms) RELEASE SAVEPOINT active_record_1
596
+  (0.1ms) SAVEPOINT active_record_1
597
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
598
+  (0.0ms) RELEASE SAVEPOINT active_record_1
599
+  (0.1ms) SAVEPOINT active_record_1
600
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
601
+  (0.1ms) RELEASE SAVEPOINT active_record_1
602
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
603
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
604
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
605
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
606
+  (0.0ms) SAVEPOINT active_record_1
607
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
608
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
609
+  (0.0ms) RELEASE SAVEPOINT active_record_1
610
+  (0.0ms) SAVEPOINT active_record_1
611
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
612
+  (0.1ms) RELEASE SAVEPOINT active_record_1
613
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
614
+  (0.4ms) rollback transaction
615
+  (0.0ms) begin transaction
616
+  (0.0ms) SAVEPOINT active_record_1
617
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
619
+  (0.0ms) SAVEPOINT active_record_1
620
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
622
+  (0.0ms) SAVEPOINT active_record_1
623
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
624
+  (0.0ms) RELEASE SAVEPOINT active_record_1
625
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
626
+  (0.1ms) SAVEPOINT active_record_1
627
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
628
+  (0.0ms) RELEASE SAVEPOINT active_record_1
629
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2)
630
+  (0.4ms) rollback transaction
631
+  (0.1ms) begin transaction
632
+  (0.0ms) SAVEPOINT active_record_1
633
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
634
+  (0.0ms) RELEASE SAVEPOINT active_record_1
635
+  (0.0ms) SAVEPOINT active_record_1
636
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
637
+  (0.0ms) RELEASE SAVEPOINT active_record_1
638
+  (0.0ms) SAVEPOINT active_record_1
639
+ SQL (0.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
640
+  (0.0ms) RELEASE SAVEPOINT active_record_1
641
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 2]]
642
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
643
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
644
+  (0.0ms) SAVEPOINT active_record_1
645
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
646
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
647
+  (0.1ms) RELEASE SAVEPOINT active_record_1
648
+  (0.0ms) SAVEPOINT active_record_1
649
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
650
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
651
+  (0.0ms) RELEASE SAVEPOINT active_record_1
652
+  (0.1ms) SAVEPOINT active_record_1
653
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
654
+  (0.1ms) RELEASE SAVEPOINT active_record_1
655
+  (0.1ms) SAVEPOINT active_record_1
656
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
657
+  (0.1ms) RELEASE SAVEPOINT active_record_1
658
+
659
+ Sent mail to user@example.com (8.5ms)
660
+ Date: Sun, 05 Jan 2014 21:46:46 +1100
661
+ From: please-change-me-at-config-initializers-notify-user@example.com
662
+ To: user@example.com
663
+ Message-ID: <52c93816e5cb5_743980c1fbe4185b4@Tomass-MacBook-Air-11.local.mail>
664
+ Subject: Rails402: You have new Newpostnotification notifications.
665
+ Mime-Version: 1.0
666
+ Content-Type: text/html;
667
+ charset=UTF-8
668
+ Content-Transfer-Encoding: quoted-printable
669
+
670
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
671
+ tml4/strict.dtd">
672
+ <html>
673
+ <head>
674
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
675
+ "/>
676
+ <title></title>
677
+ </head>
678
+
679
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
680
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
681
+ ing: optimizeLegibility;">
682
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
683
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
684
+ Logo
685
+ </div>
686
+ </div>
687
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
688
+ ">
689
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
690
+ <div>
691
+ New Post Notification happened. =
692
+
693
+ </div>
694
+ <div>
695
+ New Post Notification happened. =
696
+
697
+ </div>
698
+
699
+ </div>
700
+ </div>
701
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
702
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
703
+ <p style=3D"text-align: center;">
704
+ This is the default generated layout. A privacy declaration could g=
705
+ o here.
706
+ </p>
707
+ <p style=3D"text-align: center; margin-bottom: 0px;">
708
+ =C2=A9 MyCompany Pty Ltd
709
+ </p>
710
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
711
+ ABN 123 456 789
712
+ </p>
713
+ </div>
714
+ </div>
715
+ </body>
716
+ </html>=
717
+
718
+  (0.5ms) rollback transaction
719
+  (0.1ms) begin transaction
720
+  (0.1ms) SAVEPOINT active_record_1
721
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
722
+  (0.0ms) RELEASE SAVEPOINT active_record_1
723
+  (0.0ms) SAVEPOINT active_record_1
724
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
725
+  (0.0ms) RELEASE SAVEPOINT active_record_1
726
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
727
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
728
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
729
+  (0.1ms) SAVEPOINT active_record_1
730
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
731
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
732
+  (0.1ms) RELEASE SAVEPOINT active_record_1
733
+  (0.0ms) SAVEPOINT active_record_1
734
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
735
+  (0.0ms) RELEASE SAVEPOINT active_record_1
736
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
737
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
738
+
739
+ Sent mail to user@example.com (7.7ms)
740
+ Date: Sun, 05 Jan 2014 21:46:46 +1100
741
+ From: please-change-me-at-config-initializers-notify-user@example.com
742
+ To: user@example.com
743
+ Message-ID: <52c93816ed465_743980c1fbe4186c6@Tomass-MacBook-Air-11.local.mail>
744
+ Subject: Rails402: You have a new Newpostnotification notification.
745
+ Mime-Version: 1.0
746
+ Content-Type: text/html;
747
+ charset=UTF-8
748
+ Content-Transfer-Encoding: quoted-printable
749
+
750
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
751
+ tml4/strict.dtd">
752
+ <html>
753
+ <head>
754
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
755
+ "/>
756
+ <title></title>
757
+ </head>
758
+
759
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
760
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
761
+ ing: optimizeLegibility;">
762
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
763
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
764
+ Logo
765
+ </div>
766
+ </div>
767
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
768
+ ">
769
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
770
+ New Post Notification happened.
771
+ </div>
772
+ </div>
773
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
774
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
775
+ <p style=3D"text-align: center;">
776
+ This is the default generated layout. A privacy declaration could g=
777
+ o here.
778
+ </p>
779
+ <p style=3D"text-align: center; margin-bottom: 0px;">
780
+ =C2=A9 MyCompany Pty Ltd
781
+ </p>
782
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
783
+ ABN 123 456 789
784
+ </p>
785
+ </div>
786
+ </div>
787
+ </body>
788
+ </html>=
789
+
790
+  (0.4ms) rollback transaction
791
+  (0.1ms) begin transaction
792
+  (0.0ms) SAVEPOINT active_record_1
793
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
794
+  (0.0ms) RELEASE SAVEPOINT active_record_1
795
+  (0.0ms) SAVEPOINT active_record_1
796
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00]]
797
+  (0.0ms) RELEASE SAVEPOINT active_record_1
798
+  (0.0ms) SAVEPOINT active_record_1
799
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
800
+  (0.0ms) RELEASE SAVEPOINT active_record_1
801
+  (0.0ms) SAVEPOINT active_record_1
802
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
803
+  (0.1ms) RELEASE SAVEPOINT active_record_1
804
+  (0.0ms) SAVEPOINT active_record_1
805
+ SQL (0.4ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:46:46 UTC +00:00], ["params", "--- {}\n"]]
806
+  (0.1ms) RELEASE SAVEPOINT active_record_1
807
+ NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
808
+  (0.4ms) rollback transaction
809
+  (0.0ms) begin transaction
810
+  (0.0ms) rollback transaction
811
+  (0.0ms) begin transaction
812
+  (0.0ms) rollback transaction
813
+  (0.0ms) begin transaction
814
+  (0.0ms) rollback transaction
815
+  (0.0ms) begin transaction
816
+  (0.0ms) rollback transaction
817
+  (0.0ms) begin transaction
818
+  (0.0ms) rollback transaction
819
+  (0.0ms) begin transaction
820
+  (0.0ms) rollback transaction
821
+  (0.0ms) begin transaction
822
+  (0.0ms) rollback transaction
823
+  (1.1ms) begin transaction
824
+  (0.1ms) SAVEPOINT active_record_1
825
+ SQL (4.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
826
+  (0.1ms) RELEASE SAVEPOINT active_record_1
827
+ Processing by NotifyUser::NotificationsController#index as HTML
828
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
829
+ Completed 200 OK in 7ms (Views: 3.3ms | ActiveRecord: 0.6ms)
830
+  (6.8ms) rollback transaction
831
+  (0.1ms) begin transaction
832
+  (0.1ms) SAVEPOINT active_record_1
833
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
834
+  (0.2ms) RELEASE SAVEPOINT active_record_1
835
+  (0.2ms) SAVEPOINT active_record_1
836
+ SQL (1.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
837
+  (0.1ms) RELEASE SAVEPOINT active_record_1
838
+ Processing by NotifyUser::NotificationsController#index as HTML
839
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
840
+ Completed 200 OK in 17ms (Views: 16.0ms | ActiveRecord: 0.2ms)
841
+  (0.4ms) rollback transaction
842
+  (0.1ms) begin transaction
843
+  (0.1ms) SAVEPOINT active_record_1
844
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
845
+  (0.1ms) RELEASE SAVEPOINT active_record_1
846
+  (0.1ms) SAVEPOINT active_record_1
847
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
848
+  (0.1ms) RELEASE SAVEPOINT active_record_1
849
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
850
+ Parameters: {"ids"=>["1"]}
851
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
852
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
853
+ Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.4ms)
854
+ NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
855
+  (0.5ms) rollback transaction
856
+  (0.1ms) begin transaction
857
+  (0.1ms) SAVEPOINT active_record_1
858
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
859
+  (0.1ms) RELEASE SAVEPOINT active_record_1
860
+  (0.1ms) SAVEPOINT active_record_1
861
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
862
+  (0.1ms) RELEASE SAVEPOINT active_record_1
863
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
864
+ Parameters: {"ids"=>["1"]}
865
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
866
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
867
+ Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.3ms)
868
+  (1.3ms) rollback transaction
869
+  (0.1ms) begin transaction
870
+  (0.1ms) rollback transaction
871
+  (0.1ms) begin transaction
872
+  (0.1ms) rollback transaction
873
+  (0.1ms) begin transaction
874
+  (0.1ms) rollback transaction
875
+  (0.1ms) begin transaction
876
+  (0.1ms) SAVEPOINT active_record_1
877
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
878
+  (0.1ms) RELEASE SAVEPOINT active_record_1
879
+  (0.0ms) SAVEPOINT active_record_1
880
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
881
+  (0.1ms) RELEASE SAVEPOINT active_record_1
882
+  (0.1ms) SAVEPOINT active_record_1
883
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
884
+  (6.9ms) rollback transaction
885
+  (0.1ms) begin transaction
886
+  (0.1ms) SAVEPOINT active_record_1
887
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
888
+  (0.1ms) RELEASE SAVEPOINT active_record_1
889
+  (0.0ms) SAVEPOINT active_record_1
890
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
891
+  (0.1ms) RELEASE SAVEPOINT active_record_1
892
+  (0.1ms) SAVEPOINT active_record_1
893
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
894
+  (0.1ms) RELEASE SAVEPOINT active_record_1
895
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
896
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
897
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
898
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
899
+  (0.1ms) SAVEPOINT active_record_1
900
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
901
+ SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
902
+  (0.1ms) RELEASE SAVEPOINT active_record_1
903
+  (0.2ms) SAVEPOINT active_record_1
904
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
905
+  (0.1ms) RELEASE SAVEPOINT active_record_1
906
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
907
+  (0.4ms) rollback transaction
908
+  (0.1ms) begin transaction
909
+  (0.0ms) SAVEPOINT active_record_1
910
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
911
+  (0.1ms) RELEASE SAVEPOINT active_record_1
912
+  (0.0ms) SAVEPOINT active_record_1
913
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
914
+  (0.1ms) RELEASE SAVEPOINT active_record_1
915
+  (0.0ms) SAVEPOINT active_record_1
916
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
917
+  (0.1ms) RELEASE SAVEPOINT active_record_1
918
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
919
+  (0.1ms) SAVEPOINT active_record_1
920
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
921
+  (0.1ms) RELEASE SAVEPOINT active_record_1
922
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2)
923
+  (0.4ms) rollback transaction
924
+  (0.1ms) begin transaction
925
+  (0.1ms) SAVEPOINT active_record_1
926
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
927
+  (0.1ms) RELEASE SAVEPOINT active_record_1
928
+  (0.1ms) SAVEPOINT active_record_1
929
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
930
+  (0.1ms) RELEASE SAVEPOINT active_record_1
931
+  (0.1ms) SAVEPOINT active_record_1
932
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
933
+  (0.1ms) RELEASE SAVEPOINT active_record_1
934
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 2]]
935
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
936
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
937
+  (0.3ms) SAVEPOINT active_record_1
938
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
939
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
940
+  (0.2ms) RELEASE SAVEPOINT active_record_1
941
+  (2.1ms) SAVEPOINT active_record_1
942
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
943
+ SQL (0.4ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
944
+  (0.1ms) RELEASE SAVEPOINT active_record_1
945
+  (0.0ms) SAVEPOINT active_record_1
946
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
947
+  (0.1ms) RELEASE SAVEPOINT active_record_1
948
+  (0.1ms) SAVEPOINT active_record_1
949
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
950
+  (0.1ms) RELEASE SAVEPOINT active_record_1
951
+
952
+ Sent mail to user@example.com (10.8ms)
953
+ Date: Sun, 05 Jan 2014 21:50:55 +1100
954
+ From: please-change-me-at-config-initializers-notify-user@example.com
955
+ To: user@example.com
956
+ Message-ID: <52c9390f9c98d_74b380c2bbec64367@Tomass-MacBook-Air-11.local.mail>
957
+ Subject: Rails402: You have new Newpostnotification notifications.
958
+ Mime-Version: 1.0
959
+ Content-Type: text/html;
960
+ charset=UTF-8
961
+ Content-Transfer-Encoding: quoted-printable
962
+
963
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
964
+ tml4/strict.dtd">
965
+ <html>
966
+ <head>
967
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
968
+ "/>
969
+ <title></title>
970
+ </head>
971
+
972
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
973
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
974
+ ing: optimizeLegibility;">
975
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
976
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
977
+ Logo
978
+ </div>
979
+ </div>
980
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
981
+ ">
982
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
983
+ <div>
984
+ New Post Notification happened. =
985
+
986
+ </div>
987
+ <div>
988
+ New Post Notification happened. =
989
+
990
+ </div>
991
+
992
+ </div>
993
+ </div>
994
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
995
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
996
+ <p style=3D"text-align: center;">
997
+ This is the default generated layout. A privacy declaration could g=
998
+ o here.
999
+ </p>
1000
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1001
+ =C2=A9 MyCompany Pty Ltd
1002
+ </p>
1003
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1004
+ ABN 123 456 789
1005
+ </p>
1006
+ </div>
1007
+ </div>
1008
+ </body>
1009
+ </html>=
1010
+
1011
+  (0.4ms) rollback transaction
1012
+  (0.1ms) begin transaction
1013
+  (0.1ms) SAVEPOINT active_record_1
1014
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
1015
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1016
+  (0.0ms) SAVEPOINT active_record_1
1017
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
1018
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1019
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1020
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1021
+ 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" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1022
+  (0.1ms) SAVEPOINT active_record_1
1023
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1024
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
1025
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1026
+  (0.1ms) SAVEPOINT active_record_1
1027
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
1028
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1029
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1030
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1031
+
1032
+ Sent mail to user@example.com (8.4ms)
1033
+ Date: Sun, 05 Jan 2014 21:50:55 +1100
1034
+ From: please-change-me-at-config-initializers-notify-user@example.com
1035
+ To: user@example.com
1036
+ Message-ID: <52c9390fa861b_74b380c2bbec6444b@Tomass-MacBook-Air-11.local.mail>
1037
+ Subject: Rails402: You have a new Newpostnotification notification.
1038
+ Mime-Version: 1.0
1039
+ Content-Type: text/html;
1040
+ charset=UTF-8
1041
+ Content-Transfer-Encoding: quoted-printable
1042
+
1043
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1044
+ tml4/strict.dtd">
1045
+ <html>
1046
+ <head>
1047
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1048
+ "/>
1049
+ <title></title>
1050
+ </head>
1051
+
1052
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1053
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1054
+ ing: optimizeLegibility;">
1055
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1056
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1057
+ Logo
1058
+ </div>
1059
+ </div>
1060
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1061
+ ">
1062
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1063
+ New Post Notification happened.
1064
+ </div>
1065
+ </div>
1066
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1067
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1068
+ <p style=3D"text-align: center;">
1069
+ This is the default generated layout. A privacy declaration could g=
1070
+ o here.
1071
+ </p>
1072
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1073
+ =C2=A9 MyCompany Pty Ltd
1074
+ </p>
1075
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1076
+ ABN 123 456 789
1077
+ </p>
1078
+ </div>
1079
+ </div>
1080
+ </body>
1081
+ </html>=
1082
+
1083
+  (0.5ms) rollback transaction
1084
+  (0.1ms) begin transaction
1085
+  (0.1ms) SAVEPOINT active_record_1
1086
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
1087
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1088
+  (0.1ms) SAVEPOINT active_record_1
1089
+ SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00]]
1090
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1091
+  (0.0ms) SAVEPOINT active_record_1
1092
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
1093
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1094
+  (0.1ms) SAVEPOINT active_record_1
1095
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
1096
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1097
+  (0.0ms) SAVEPOINT active_record_1
1098
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 10:50:55 UTC +00:00], ["params", "--- {}\n"]]
1099
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1100
+ NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1101
+  (0.5ms) rollback transaction
1102
+  (0.1ms) begin transaction
1103
+  (0.1ms) rollback transaction
1104
+  (0.0ms) begin transaction
1105
+  (0.0ms) rollback transaction
1106
+  (0.0ms) begin transaction
1107
+  (0.0ms) rollback transaction
1108
+  (0.0ms) begin transaction
1109
+  (0.0ms) rollback transaction
1110
+  (0.0ms) begin transaction
1111
+  (0.0ms) rollback transaction
1112
+  (0.0ms) begin transaction
1113
+  (0.0ms) rollback transaction
1114
+  (0.0ms) begin transaction
1115
+  (0.2ms) rollback transaction
1116
+  (0.4ms) begin transaction
1117
+  (0.1ms) SAVEPOINT active_record_1
1118
+ SQL (3.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1119
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1120
+ Processing by NotifyUser::NotificationsController#index as HTML
1121
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
1122
+ Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.4ms)
1123
+  (6.8ms) rollback transaction
1124
+  (0.1ms) begin transaction
1125
+  (0.1ms) SAVEPOINT active_record_1
1126
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1127
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1128
+  (0.1ms) SAVEPOINT active_record_1
1129
+ SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1130
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1131
+ Processing by NotifyUser::NotificationsController#index as HTML
1132
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
1133
+ Completed 200 OK in 13ms (Views: 12.0ms | ActiveRecord: 0.2ms)
1134
+  (0.5ms) rollback transaction
1135
+  (0.1ms) begin transaction
1136
+  (0.1ms) SAVEPOINT active_record_1
1137
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1138
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1139
+  (0.1ms) SAVEPOINT active_record_1
1140
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1141
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1142
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
1143
+ Parameters: {"ids"=>["1"]}
1144
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1145
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1146
+ Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.4ms)
1147
+ NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1148
+  (0.5ms) rollback transaction
1149
+  (0.1ms) begin transaction
1150
+  (0.1ms) SAVEPOINT active_record_1
1151
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1152
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1153
+  (0.1ms) SAVEPOINT active_record_1
1154
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1155
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1156
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
1157
+ Parameters: {"ids"=>["1"]}
1158
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1159
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1160
+ Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.4ms)
1161
+  (0.5ms) rollback transaction
1162
+  (0.1ms) begin transaction
1163
+  (0.1ms) rollback transaction
1164
+  (0.0ms) begin transaction
1165
+  (0.2ms) rollback transaction
1166
+  (0.1ms) begin transaction
1167
+  (0.1ms) rollback transaction
1168
+  (0.1ms) begin transaction
1169
+  (0.1ms) SAVEPOINT active_record_1
1170
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1171
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1172
+  (0.1ms) SAVEPOINT active_record_1
1173
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1174
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1175
+  (0.1ms) SAVEPOINT active_record_1
1176
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1177
+  (0.7ms) rollback transaction
1178
+  (0.1ms) begin transaction
1179
+  (0.1ms) SAVEPOINT active_record_1
1180
+ SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1181
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1182
+  (0.0ms) SAVEPOINT active_record_1
1183
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1184
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1185
+  (0.1ms) SAVEPOINT active_record_1
1186
+ SQL (0.4ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1187
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1188
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
1189
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1190
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1191
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1192
+  (0.1ms) SAVEPOINT active_record_1
1193
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1194
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1195
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1196
+  (0.0ms) SAVEPOINT active_record_1
1197
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1198
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1199
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1200
+  (0.5ms) rollback transaction
1201
+  (0.1ms) begin transaction
1202
+  (0.1ms) SAVEPOINT active_record_1
1203
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1204
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1205
+  (0.1ms) SAVEPOINT active_record_1
1206
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1207
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1208
+  (0.0ms) SAVEPOINT active_record_1
1209
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1210
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1211
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
1212
+  (0.1ms) SAVEPOINT active_record_1
1213
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1214
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1215
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2)
1216
+  (0.4ms) rollback transaction
1217
+  (0.1ms) begin transaction
1218
+  (0.1ms) SAVEPOINT active_record_1
1219
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1220
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1221
+  (0.0ms) SAVEPOINT active_record_1
1222
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1223
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1224
+  (0.0ms) SAVEPOINT active_record_1
1225
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1226
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1227
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 2]]
1228
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1229
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1230
+  (0.1ms) SAVEPOINT active_record_1
1231
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1232
+ SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1233
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1234
+  (0.0ms) SAVEPOINT active_record_1
1235
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1236
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1237
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1238
+  (0.0ms) SAVEPOINT active_record_1
1239
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1240
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1241
+  (0.0ms) SAVEPOINT active_record_1
1242
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1243
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1244
+
1245
+ Sent mail to user@example.com (11.6ms)
1246
+ Date: Sun, 05 Jan 2014 22:08:05 +1100
1247
+ From: please-change-me-at-config-initializers-notify-user@example.com
1248
+ To: user@example.com
1249
+ Message-ID: <52c93d15c2d49_76438082dbf89262c@Tomass-MacBook-Air-11.local.mail>
1250
+ Subject: Rails402: You have new Newpostnotification notifications.
1251
+ Mime-Version: 1.0
1252
+ Content-Type: text/html;
1253
+ charset=UTF-8
1254
+ Content-Transfer-Encoding: quoted-printable
1255
+
1256
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1257
+ tml4/strict.dtd">
1258
+ <html>
1259
+ <head>
1260
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1261
+ "/>
1262
+ <title></title>
1263
+ </head>
1264
+
1265
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1266
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1267
+ ing: optimizeLegibility;">
1268
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1269
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1270
+ Logo
1271
+ </div>
1272
+ </div>
1273
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1274
+ ">
1275
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1276
+ <div>
1277
+ New Post Notification happened. =
1278
+
1279
+ </div>
1280
+ <div>
1281
+ New Post Notification happened. =
1282
+
1283
+ </div>
1284
+
1285
+ </div>
1286
+ </div>
1287
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1288
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1289
+ <p style=3D"text-align: center;">
1290
+ This is the default generated layout. A privacy declaration could g=
1291
+ o here.
1292
+ </p>
1293
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1294
+ =C2=A9 MyCompany Pty Ltd
1295
+ </p>
1296
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1297
+ ABN 123 456 789
1298
+ </p>
1299
+ </div>
1300
+ </div>
1301
+ </body>
1302
+ </html>=
1303
+
1304
+  (0.4ms) rollback transaction
1305
+  (0.1ms) begin transaction
1306
+  (0.1ms) SAVEPOINT active_record_1
1307
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1308
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1309
+  (0.1ms) SAVEPOINT active_record_1
1310
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1311
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1312
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1313
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1314
+ NotifyUser::BaseNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1315
+  (0.1ms) SAVEPOINT active_record_1
1316
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1317
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1318
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1319
+  (0.0ms) SAVEPOINT active_record_1
1320
+ SQL (0.8ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1321
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1322
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1323
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1324
+
1325
+ Sent mail to user@example.com (10.7ms)
1326
+ Date: Sun, 05 Jan 2014 22:08:05 +1100
1327
+ From: please-change-me-at-config-initializers-notify-user@example.com
1328
+ To: user@example.com
1329
+ Message-ID: <52c93d15ce74f_76438082dbf892715@Tomass-MacBook-Air-11.local.mail>
1330
+ Subject: Rails402: You have a new Newpostnotification notification.
1331
+ Mime-Version: 1.0
1332
+ Content-Type: text/html;
1333
+ charset=UTF-8
1334
+ Content-Transfer-Encoding: quoted-printable
1335
+
1336
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1337
+ tml4/strict.dtd">
1338
+ <html>
1339
+ <head>
1340
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1341
+ "/>
1342
+ <title></title>
1343
+ </head>
1344
+
1345
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1346
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1347
+ ing: optimizeLegibility;">
1348
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1349
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1350
+ Logo
1351
+ </div>
1352
+ </div>
1353
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1354
+ ">
1355
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1356
+ New Post Notification happened.
1357
+ </div>
1358
+ </div>
1359
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1360
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1361
+ <p style=3D"text-align: center;">
1362
+ This is the default generated layout. A privacy declaration could g=
1363
+ o here.
1364
+ </p>
1365
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1366
+ =C2=A9 MyCompany Pty Ltd
1367
+ </p>
1368
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1369
+ ABN 123 456 789
1370
+ </p>
1371
+ </div>
1372
+ </div>
1373
+ </body>
1374
+ </html>=
1375
+
1376
+  (0.5ms) rollback transaction
1377
+  (0.1ms) begin transaction
1378
+  (0.1ms) SAVEPOINT active_record_1
1379
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1380
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1381
+  (0.1ms) SAVEPOINT active_record_1
1382
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00]]
1383
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1384
+  (0.1ms) SAVEPOINT active_record_1
1385
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1386
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1387
+  (0.1ms) SAVEPOINT active_record_1
1388
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1389
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1390
+  (0.0ms) SAVEPOINT active_record_1
1391
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 11:08:05 UTC +00:00], ["params", "--- {}\n"]]
1392
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1393
+ NewPostNotification Load (0.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1394
+  (0.4ms) rollback transaction
1395
+  (0.1ms) begin transaction
1396
+  (0.1ms) rollback transaction
1397
+  (0.1ms) begin transaction
1398
+  (0.1ms) rollback transaction
1399
+  (0.1ms) begin transaction
1400
+  (0.1ms) rollback transaction
1401
+  (0.1ms) begin transaction
1402
+  (0.0ms) rollback transaction
1403
+  (0.0ms) begin transaction
1404
+  (0.0ms) rollback transaction
1405
+  (0.0ms) begin transaction
1406
+  (0.0ms) rollback transaction
1407
+  (0.0ms) begin transaction
1408
+  (0.0ms) rollback transaction
1409
+  (0.3ms) begin transaction
1410
+  (0.1ms) SAVEPOINT active_record_1
1411
+ SQL (5.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1412
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1413
+ Processing by NotifyUser::NotificationsController#index as HTML
1414
+ NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
1415
+ Completed 200 OK in 7ms (Views: 3.0ms | ActiveRecord: 1.0ms)
1416
+  (0.3ms) rollback transaction
1417
+  (0.1ms) begin transaction
1418
+  (0.0ms) SAVEPOINT active_record_1
1419
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1421
+  (0.1ms) SAVEPOINT active_record_1
1422
+ SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1423
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1424
+ Processing by NotifyUser::NotificationsController#index as HTML
1425
+ NotifyUser::BaseNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0
1426
+ Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.2ms)
1427
+  (0.6ms) rollback transaction
1428
+  (0.0ms) begin transaction
1429
+  (0.0ms) SAVEPOINT active_record_1
1430
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1432
+  (0.0ms) SAVEPOINT active_record_1
1433
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1434
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1435
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
1436
+ Parameters: {"ids"=>["1"]}
1437
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1438
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1439
+ Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.2ms)
1440
+ NewPostNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1441
+  (0.6ms) rollback transaction
1442
+  (0.1ms) begin transaction
1443
+  (0.0ms) SAVEPOINT active_record_1
1444
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1445
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1446
+  (0.0ms) SAVEPOINT active_record_1
1447
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "---\n:name: Mr. Blobby\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1448
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1449
+ Processing by NotifyUser::NotificationsController#mark_read as HTML
1450
+ Parameters: {"ids"=>["1"]}
1451
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1452
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1'))
1453
+ Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.3ms)
1454
+  (0.4ms) rollback transaction
1455
+  (0.1ms) begin transaction
1456
+  (0.1ms) rollback transaction
1457
+  (0.1ms) begin transaction
1458
+  (0.1ms) rollback transaction
1459
+  (0.1ms) begin transaction
1460
+  (0.1ms) rollback transaction
1461
+  (0.0ms) begin transaction
1462
+  (0.0ms) SAVEPOINT active_record_1
1463
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1464
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1465
+  (0.1ms) SAVEPOINT active_record_1
1466
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1468
+  (0.1ms) SAVEPOINT active_record_1
1469
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1470
+  (0.4ms) rollback transaction
1471
+  (0.1ms) begin transaction
1472
+  (0.0ms) SAVEPOINT active_record_1
1473
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1474
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1475
+  (0.0ms) SAVEPOINT active_record_1
1476
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1477
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1478
+  (0.1ms) SAVEPOINT active_record_1
1479
+ SQL (0.3ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1480
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1481
+  (0.2ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
1482
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1483
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1484
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1485
+  (0.0ms) SAVEPOINT active_record_1
1486
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1487
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1488
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1489
+  (0.0ms) SAVEPOINT active_record_1
1490
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1491
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1492
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1493
+  (0.5ms) rollback transaction
1494
+  (0.1ms) begin transaction
1495
+  (0.0ms) SAVEPOINT active_record_1
1496
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1497
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1498
+  (0.1ms) SAVEPOINT active_record_1
1499
+ SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1501
+  (0.0ms) SAVEPOINT active_record_1
1502
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1503
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1504
+  (0.1ms) 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" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1)
1505
+  (0.0ms) SAVEPOINT active_record_1
1506
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1507
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1508
+  (0.3ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 2)
1509
+  (0.6ms) rollback transaction
1510
+  (0.1ms) begin transaction
1511
+  (0.0ms) SAVEPOINT active_record_1
1512
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1513
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1514
+  (0.0ms) SAVEPOINT active_record_1
1515
+ SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1516
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1517
+  (0.1ms) SAVEPOINT active_record_1
1518
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1519
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1520
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 2]]
1521
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1522
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1523
+  (0.0ms) SAVEPOINT active_record_1
1524
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1525
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1526
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1527
+  (0.0ms) SAVEPOINT active_record_1
1528
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1529
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1530
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1531
+  (0.0ms) SAVEPOINT active_record_1
1532
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1533
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1534
+  (0.0ms) SAVEPOINT active_record_1
1535
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 2 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1536
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1537
+
1538
+ Sent mail to user@example.com (9.4ms)
1539
+ Date: Mon, 06 Jan 2014 10:30:53 +1100
1540
+ From: please-change-me-at-config-initializers-notify-user@example.com
1541
+ To: user@example.com
1542
+ Message-ID: <52c9eb2d5b986_7d8880c1bbe873f6@Tomass-MacBook-Air-11.local.mail>
1543
+ Subject: Rails402: You have new Newpostnotification notifications.
1544
+ Mime-Version: 1.0
1545
+ Content-Type: text/html;
1546
+ charset=UTF-8
1547
+ Content-Transfer-Encoding: quoted-printable
1548
+
1549
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1550
+ tml4/strict.dtd">
1551
+ <html>
1552
+ <head>
1553
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1554
+ "/>
1555
+ <title></title>
1556
+ </head>
1557
+
1558
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1559
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1560
+ ing: optimizeLegibility;">
1561
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1562
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1563
+ Logo
1564
+ </div>
1565
+ </div>
1566
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1567
+ ">
1568
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1569
+ <div>
1570
+ New Post Notification happened. =
1571
+
1572
+ </div>
1573
+ <div>
1574
+ New Post Notification happened. =
1575
+
1576
+ </div>
1577
+
1578
+ </div>
1579
+ </div>
1580
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1581
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1582
+ <p style=3D"text-align: center;">
1583
+ This is the default generated layout. A privacy declaration could g=
1584
+ o here.
1585
+ </p>
1586
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1587
+ =C2=A9 MyCompany Pty Ltd
1588
+ </p>
1589
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1590
+ ABN 123 456 789
1591
+ </p>
1592
+ </div>
1593
+ </div>
1594
+ </body>
1595
+ </html>=
1596
+
1597
+  (0.4ms) rollback transaction
1598
+  (0.1ms) begin transaction
1599
+  (0.0ms) SAVEPOINT active_record_1
1600
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1601
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1602
+  (0.0ms) SAVEPOINT active_record_1
1603
+ SQL (0.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1604
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1605
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = ? LIMIT 1 [["id", 1]]
1606
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1607
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
1608
+  (0.0ms) SAVEPOINT active_record_1
1609
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1610
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1612
+  (0.0ms) SAVEPOINT active_record_1
1613
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1614
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1615
+ NotifyUser::BaseNotification Load (0.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1616
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
1617
+
1618
+ Sent mail to user@example.com (6.5ms)
1619
+ Date: Mon, 06 Jan 2014 10:30:53 +1100
1620
+ From: please-change-me-at-config-initializers-notify-user@example.com
1621
+ To: user@example.com
1622
+ Message-ID: <52c9eb2d62c1f_7d8880c1bbe874a9@Tomass-MacBook-Air-11.local.mail>
1623
+ Subject: Rails402: You have a new Newpostnotification notification.
1624
+ Mime-Version: 1.0
1625
+ Content-Type: text/html;
1626
+ charset=UTF-8
1627
+ Content-Transfer-Encoding: quoted-printable
1628
+
1629
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
1630
+ tml4/strict.dtd">
1631
+ <html>
1632
+ <head>
1633
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
1634
+ "/>
1635
+ <title></title>
1636
+ </head>
1637
+
1638
+ <body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
1639
+ 0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
1640
+ ing: optimizeLegibility;">
1641
+ <div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
1642
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
1643
+ Logo
1644
+ </div>
1645
+ </div>
1646
+ <div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
1647
+ ">
1648
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
1649
+ New Post Notification happened.
1650
+ </div>
1651
+ </div>
1652
+ <div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
1653
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
1654
+ <p style=3D"text-align: center;">
1655
+ This is the default generated layout. A privacy declaration could g=
1656
+ o here.
1657
+ </p>
1658
+ <p style=3D"text-align: center; margin-bottom: 0px;">
1659
+ =C2=A9 MyCompany Pty Ltd
1660
+ </p>
1661
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
1662
+ ABN 123 456 789
1663
+ </p>
1664
+ </div>
1665
+ </div>
1666
+ </body>
1667
+ </html>=
1668
+
1669
+  (0.5ms) rollback transaction
1670
+  (0.1ms) begin transaction
1671
+  (0.1ms) SAVEPOINT active_record_1
1672
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES (?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1673
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1674
+  (0.1ms) SAVEPOINT active_record_1
1675
+ SQL (0.3ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"], ["state", "pending"], ["target_id", 1], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00]]
1676
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1677
+  (0.1ms) SAVEPOINT active_record_1
1678
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1679
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1680
+  (0.0ms) SAVEPOINT active_record_1
1681
+ SQL (0.1ms) UPDATE "notify_user_notifications" SET "state" = ?, "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["state", "sent"], ["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1682
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1683
+  (0.1ms) SAVEPOINT active_record_1
1684
+ SQL (0.2ms) UPDATE "notify_user_notifications" SET "updated_at" = ?, "params" = ? WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 [["updated_at", Sun, 05 Jan 2014 23:30:53 UTC +00:00], ["params", "--- {}\n"]]
1685
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1686
+ NewPostNotification Load (0.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
1687
+  (0.5ms) rollback transaction
1688
+  (0.1ms) begin transaction
1689
+  (0.1ms) rollback transaction
1690
+  (0.1ms) begin transaction
1691
+  (0.1ms) rollback transaction
1692
+  (0.0ms) begin transaction
1693
+  (0.0ms) rollback transaction
1694
+  (0.0ms) begin transaction
1695
+  (0.0ms) rollback transaction
1696
+  (0.0ms) begin transaction
1697
+  (0.0ms) rollback transaction
1698
+  (0.0ms) begin transaction
1699
+  (0.1ms) rollback transaction
1700
+  (0.0ms) begin transaction
1701
+  (0.1ms) rollback transaction