snaps 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +157 -0
  4. data/Rakefile +30 -0
  5. data/app/assets/javascripts/snaps/application.js +13 -0
  6. data/app/assets/stylesheets/snaps/application.css +15 -0
  7. data/app/controllers/snaps/application_controller.rb +4 -0
  8. data/app/helpers/snaps/application_helper.rb +4 -0
  9. data/app/models/concerns/snaps/suppressor.rb +55 -0
  10. data/app/models/snaps/tag.rb +45 -0
  11. data/app/views/layouts/snaps/application.html.erb +14 -0
  12. data/config/routes.rb +2 -0
  13. data/db/migrate/20150321131740_create_snaps_tags.rb +12 -0
  14. data/lib/snaps.rb +61 -0
  15. data/lib/snaps/engine.rb +13 -0
  16. data/lib/snaps/snapshot.rb +42 -0
  17. data/lib/snaps/version.rb +3 -0
  18. data/lib/tasks/snaps_tasks.rake +4 -0
  19. data/spec/dummy/README.rdoc +28 -0
  20. data/spec/dummy/Rakefile +6 -0
  21. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  22. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  23. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  24. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  25. data/spec/dummy/app/models/post.rb +3 -0
  26. data/spec/dummy/app/models/post_with_sections.rb +7 -0
  27. data/spec/dummy/app/models/section.rb +5 -0
  28. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/spec/dummy/bin/bundle +3 -0
  30. data/spec/dummy/bin/rails +4 -0
  31. data/spec/dummy/bin/rake +4 -0
  32. data/spec/dummy/bin/setup +29 -0
  33. data/spec/dummy/config.ru +4 -0
  34. data/spec/dummy/config/application.rb +26 -0
  35. data/spec/dummy/config/boot.rb +5 -0
  36. data/spec/dummy/config/database.yml +25 -0
  37. data/spec/dummy/config/environment.rb +5 -0
  38. data/spec/dummy/config/environments/development.rb +41 -0
  39. data/spec/dummy/config/environments/production.rb +79 -0
  40. data/spec/dummy/config/environments/test.rb +42 -0
  41. data/spec/dummy/config/initializers/assets.rb +11 -0
  42. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  43. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  44. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  45. data/spec/dummy/config/initializers/inflections.rb +16 -0
  46. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  47. data/spec/dummy/config/initializers/session_store.rb +3 -0
  48. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  49. data/spec/dummy/config/locales/en.yml +23 -0
  50. data/spec/dummy/config/routes.rb +4 -0
  51. data/spec/dummy/config/secrets.yml +22 -0
  52. data/spec/dummy/db/development.sqlite3 +0 -0
  53. data/spec/dummy/db/migrate/20150321145225_create_posts.rb +11 -0
  54. data/spec/dummy/db/migrate/20150323173024_create_sections.rb +11 -0
  55. data/spec/dummy/db/migrate/20150324074047_create_snaps_tags.snaps.rb +13 -0
  56. data/spec/dummy/db/schema.rb +41 -0
  57. data/spec/dummy/db/test.sqlite3 +0 -0
  58. data/spec/dummy/log/development.log +36 -0
  59. data/spec/dummy/log/test.log +472 -0
  60. data/spec/dummy/public/404.html +67 -0
  61. data/spec/dummy/public/422.html +67 -0
  62. data/spec/dummy/public/500.html +66 -0
  63. data/spec/dummy/public/favicon.ico +0 -0
  64. data/spec/dummy/spec/factories/posts.rb +11 -0
  65. data/spec/dummy/spec/factories/sections.rb +8 -0
  66. data/spec/integration/revision_spec.rb +214 -0
  67. data/spec/integration/revision_spec.rb! +8 -0
  68. data/spec/spec_helper.rb +26 -0
  69. data/spec/support/config/timecop.rb +11 -0
  70. metadata +247 -0
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -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,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -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,4 @@
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
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_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,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Snaps::Engine => "/snaps"
4
+ end
@@ -0,0 +1,22 @@
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 the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: d845e0a09d7354f792444de853e8dc71efb7eda392bd738236903ffa200208d264b49c1b3bc2a4adcead9f8eb20a8ae04c52904097040d77628329e04382f7d2
15
+
16
+ test:
17
+ secret_key_base: 7c7f5733e39ed4d8a9c808c171dde2becfec7a4a7344ec20eb63b892e54f18b622bdab6be31f2c64681a3d3483d5cab69782ce74b36acbd4ee65a5ecb41e0e10
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,11 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.integer :perma_id
5
+ t.string :title
6
+ t.text :body
7
+
8
+ t.timestamps null: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateSections < ActiveRecord::Migration
2
+ def change
3
+ create_table :sections do |t|
4
+ t.integer :post_id
5
+ t.integer :perma_id
6
+ t.string :title
7
+
8
+ t.timestamps null: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # This migration comes from snaps (originally 20150321131740)
2
+ class CreateSnapsTags < ActiveRecord::Migration
3
+ def change
4
+ create_table :snaps_tags do |t|
5
+ t.integer :record_id
6
+ t.string :record_type
7
+ t.string :tag
8
+ t.timestamp :superseded_at
9
+
10
+ t.timestamps null: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,41 @@
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: 20150324074047) do
15
+
16
+ create_table "posts", force: :cascade do |t|
17
+ t.integer "perma_id"
18
+ t.string "title"
19
+ t.text "body"
20
+ t.datetime "created_at", null: false
21
+ t.datetime "updated_at", null: false
22
+ end
23
+
24
+ create_table "sections", force: :cascade do |t|
25
+ t.integer "post_id"
26
+ t.integer "perma_id"
27
+ t.string "title"
28
+ t.datetime "created_at", null: false
29
+ t.datetime "updated_at", null: false
30
+ end
31
+
32
+ create_table "snaps_tags", force: :cascade do |t|
33
+ t.integer "record_id"
34
+ t.string "record_type"
35
+ t.string "tag"
36
+ t.datetime "superseded_at"
37
+ t.datetime "created_at", null: false
38
+ t.datetime "updated_at", null: false
39
+ end
40
+
41
+ end
@@ -0,0 +1,36 @@
1
+  (24.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "title" varchar, "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2
+  (40.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "perma_id" integer, "title" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3
+  (37.8ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
4
+  (35.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
5
+  (0.3ms) select sqlite_version(*)
6
+  (29.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
7
+  (0.2ms) SELECT version FROM "schema_migrations"
8
+  (28.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150324074047')
9
+  (32.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20150321145225')
10
+  (34.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150323173024')
11
+  (24.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20150321131740')
12
+  (38.4ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "title" varchar, "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
13
+  (24.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "perma_id" integer, "title" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
14
+  (29.9ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
15
+  (40.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
16
+  (0.3ms) select sqlite_version(*)
17
+  (32.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
18
+  (0.3ms) SELECT version FROM "schema_migrations"
19
+  (35.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150324074047')
20
+  (29.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150321145225')
21
+  (46.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150323173024')
22
+  (26.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150321131740')
23
+  (23.4ms) DROP TABLE "posts"
24
+  (42.5ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "title" varchar, "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
25
+  (41.9ms) DROP TABLE "sections"
26
+  (24.2ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "perma_id" integer, "title" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
27
+  (45.4ms) DROP TABLE "snaps_tags"
28
+  (38.7ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
29
+  (0.2ms) SELECT version FROM "schema_migrations"
30
+  (48.8ms) DROP TABLE "posts"
31
+  (29.1ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "title" varchar, "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
32
+  (44.8ms) DROP TABLE "sections"
33
+  (35.5ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "perma_id" integer, "title" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
34
+  (34.4ms) DROP TABLE "snaps_tags"
35
+  (39.1ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
36
+  (0.3ms) SELECT version FROM "schema_migrations"
@@ -0,0 +1,472 @@
1
+  (0.5ms) begin transaction
2
+  (0.0ms) SAVEPOINT active_record_1
3
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
4
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
5
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
6
+ ON posts.id = snaps_tags.record_id
7
+ AND snaps_tags.record_type = 'Post'
8
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
9
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
10
+  (0.0ms) RELEASE SAVEPOINT active_record_1
11
+ Snaps::Tag Load (0.0ms) SELECT "snaps_tags".* FROM "snaps_tags" WHERE "snaps_tags"."record_type" = 'Post' AND "snaps_tags"."record_id" = 1 LIMIT 1
12
+  (0.2ms) rollback transaction
13
+  (0.1ms) begin transaction
14
+  (0.0ms) SAVEPOINT active_record_1
15
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
16
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
17
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
18
+ ON posts.id = snaps_tags.record_id
19
+ AND snaps_tags.record_type = 'Post'
20
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
21
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
22
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23
+  (0.0ms) SAVEPOINT active_record_1
24
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
25
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 2], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
26
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
27
+ ON posts.id = snaps_tags.record_id
28
+ AND snaps_tags.record_type = 'Post'
29
+ AND perma_id = 2 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
30
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
31
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32
+  (0.2ms) rollback transaction
33
+  (0.1ms) begin transaction
34
+  (0.0ms) SAVEPOINT active_record_1
35
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
36
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
37
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
38
+ ON posts.id = snaps_tags.record_id
39
+ AND snaps_tags.record_type = 'Post'
40
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
41
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
42
+  (0.0ms) RELEASE SAVEPOINT active_record_1
43
+  (0.0ms) SAVEPOINT active_record_1
44
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
45
+  (0.0ms) RELEASE SAVEPOINT active_record_1
46
+  (0.0ms) SAVEPOINT active_record_1
47
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
48
+ ON posts.id = snaps_tags.record_id
49
+ AND snaps_tags.record_type = 'Post'
50
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
51
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
52
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53
+  (0.0ms) SAVEPOINT active_record_1
54
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
55
+ ON posts.id = snaps_tags.record_id
56
+ AND snaps_tags.record_type = 'Post'
57
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "foo"]]
58
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "foo"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
59
+  (0.0ms) RELEASE SAVEPOINT active_record_1
60
+ Snaps::Tag Load (0.0ms) SELECT "snaps_tags".* FROM "snaps_tags" WHERE "snaps_tags"."id" = ? LIMIT 1 [["id", 2]]
61
+  (0.3ms) rollback transaction
62
+  (0.1ms) begin transaction
63
+  (0.0ms) SAVEPOINT active_record_1
64
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
65
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
66
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
67
+ ON posts.id = snaps_tags.record_id
68
+ AND snaps_tags.record_type = 'Post'
69
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
70
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
71
+  (0.0ms) RELEASE SAVEPOINT active_record_1
72
+  (0.0ms) SAVEPOINT active_record_1
73
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
74
+  (0.0ms) RELEASE SAVEPOINT active_record_1
75
+  (0.0ms) SAVEPOINT active_record_1
76
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
77
+ ON posts.id = snaps_tags.record_id
78
+ AND snaps_tags.record_type = 'Post'
79
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
80
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
81
+  (0.0ms) RELEASE SAVEPOINT active_record_1
82
+  (0.0ms) SAVEPOINT active_record_1
83
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
84
+ ON posts.id = snaps_tags.record_id
85
+ AND snaps_tags.record_type = 'Post'
86
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
87
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
88
+  (0.0ms) RELEASE SAVEPOINT active_record_1
89
+ Snaps::Tag Load (0.0ms) SELECT "snaps_tags".* FROM "snaps_tags" WHERE "snaps_tags"."id" = ? LIMIT 1 [["id", 2]]
90
+  (0.3ms) rollback transaction
91
+  (0.1ms) begin transaction
92
+  (0.0ms) SAVEPOINT active_record_1
93
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
94
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
95
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
96
+ ON posts.id = snaps_tags.record_id
97
+ AND snaps_tags.record_type = 'Post'
98
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
99
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
101
+  (0.0ms) SAVEPOINT active_record_1
102
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
103
+ ON posts.id = snaps_tags.record_id
104
+ AND snaps_tags.record_type = 'Post'
105
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
106
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
107
+  (0.0ms) RELEASE SAVEPOINT active_record_1
108
+  (0.2ms) rollback transaction
109
+  (0.1ms) begin transaction
110
+  (0.0ms) SAVEPOINT active_record_1
111
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
112
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
113
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
114
+ ON posts.id = snaps_tags.record_id
115
+ AND snaps_tags.record_type = 'Post'
116
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
117
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
118
+  (0.0ms) RELEASE SAVEPOINT active_record_1
119
+  (0.0ms) SAVEPOINT active_record_1
120
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
121
+ ON posts.id = snaps_tags.record_id
122
+ AND snaps_tags.record_type = 'Post'
123
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
124
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
125
+  (0.0ms) RELEASE SAVEPOINT active_record_1
126
+  (0.0ms) SAVEPOINT active_record_1
127
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
128
+  (0.0ms) RELEASE SAVEPOINT active_record_1
129
+  (0.0ms) SAVEPOINT active_record_1
130
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
131
+ ON posts.id = snaps_tags.record_id
132
+ AND snaps_tags.record_type = 'Post'
133
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
134
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
135
+  (0.0ms) RELEASE SAVEPOINT active_record_1
136
+  (0.0ms) SAVEPOINT active_record_1
137
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2013-01-14 23:00:00.000000"], ["updated_at", "2013-01-14 23:00:00.000000"]]
138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
139
+  (0.0ms) SAVEPOINT active_record_1
140
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2013-01-14 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
141
+ ON posts.id = snaps_tags.record_id
142
+ AND snaps_tags.record_type = 'Post'
143
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
144
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 3], ["record_type", "Post"], ["tag", "published"], ["created_at", "2013-01-14 23:00:00.000000"], ["updated_at", "2013-01-14 23:00:00.000000"]]
145
+  (0.0ms) RELEASE SAVEPOINT active_record_1
146
+ Snaps::Tag Load (0.0ms) SELECT "snaps_tags".* FROM "snaps_tags" WHERE "snaps_tags"."id" = ? LIMIT 1 [["id", 2]]
147
+  (0.2ms) rollback transaction
148
+  (0.1ms) begin transaction
149
+  (0.0ms) SAVEPOINT active_record_1
150
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
151
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
152
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
153
+ ON posts.id = snaps_tags.record_id
154
+ AND snaps_tags.record_type = 'Post'
155
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
156
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
157
+  (0.0ms) RELEASE SAVEPOINT active_record_1
158
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
159
+ ON posts.id = snaps_tags.record_id
160
+ AND snaps_tags.record_type = 'Post'
161
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL)
162
+  (0.2ms) rollback transaction
163
+  (0.1ms) begin transaction
164
+  (0.0ms) SAVEPOINT active_record_1
165
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
166
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
167
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
168
+ ON posts.id = snaps_tags.record_id
169
+ AND snaps_tags.record_type = 'Post'
170
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
171
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
172
+  (0.0ms) RELEASE SAVEPOINT active_record_1
173
+  (0.0ms) SAVEPOINT active_record_1
174
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
175
+ ON posts.id = snaps_tags.record_id
176
+ AND snaps_tags.record_type = 'Post'
177
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
178
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
180
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
181
+ ON posts.id = snaps_tags.record_id
182
+ AND snaps_tags.record_type = 'Post'
183
+ AND snaps_tags.tag = 'other' WHERE (snaps_tags.superseded_at IS NULL)
184
+  (0.2ms) rollback transaction
185
+  (0.1ms) begin transaction
186
+  (0.0ms) SAVEPOINT active_record_1
187
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
188
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
189
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
190
+ ON posts.id = snaps_tags.record_id
191
+ AND snaps_tags.record_type = 'Post'
192
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
193
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
194
+  (0.0ms) RELEASE SAVEPOINT active_record_1
195
+  (0.0ms) SAVEPOINT active_record_1
196
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
197
+ ON posts.id = snaps_tags.record_id
198
+ AND snaps_tags.record_type = 'Post'
199
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
200
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
202
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
203
+ ON posts.id = snaps_tags.record_id
204
+ AND snaps_tags.record_type = 'Post'
205
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL)
206
+  (0.2ms) rollback transaction
207
+  (0.1ms) begin transaction
208
+  (0.0ms) SAVEPOINT active_record_1
209
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
210
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
211
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
212
+ ON posts.id = snaps_tags.record_id
213
+ AND snaps_tags.record_type = 'Post'
214
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
215
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
216
+  (0.0ms) RELEASE SAVEPOINT active_record_1
217
+  (0.0ms) SAVEPOINT active_record_1
218
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
220
+  (0.0ms) SAVEPOINT active_record_1
221
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
222
+ ON posts.id = snaps_tags.record_id
223
+ AND snaps_tags.record_type = 'Post'
224
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
225
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
226
+  (0.0ms) RELEASE SAVEPOINT active_record_1
227
+  (0.0ms) SAVEPOINT active_record_1
228
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
229
+ ON posts.id = snaps_tags.record_id
230
+ AND snaps_tags.record_type = 'Post'
231
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
232
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
233
+  (0.0ms) RELEASE SAVEPOINT active_record_1
234
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
235
+ ON posts.id = snaps_tags.record_id
236
+ AND snaps_tags.record_type = 'Post'
237
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL)
238
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
239
+ ON posts.id = snaps_tags.record_id
240
+ AND snaps_tags.record_type = 'Post'
241
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) ORDER BY "posts"."id" ASC LIMIT 1
242
+  (0.3ms) rollback transaction
243
+  (0.1ms) begin transaction
244
+  (0.0ms) SAVEPOINT active_record_1
245
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
246
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
247
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
248
+ ON posts.id = snaps_tags.record_id
249
+ AND snaps_tags.record_type = 'Post'
250
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
251
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
252
+  (0.0ms) RELEASE SAVEPOINT active_record_1
253
+  (0.0ms) SAVEPOINT active_record_1
254
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
255
+  (0.0ms) RELEASE SAVEPOINT active_record_1
256
+  (0.0ms) SAVEPOINT active_record_1
257
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
258
+ ON posts.id = snaps_tags.record_id
259
+ AND snaps_tags.record_type = 'Post'
260
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
261
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
262
+  (0.0ms) RELEASE SAVEPOINT active_record_1
263
+  (0.0ms) SAVEPOINT active_record_1
264
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
265
+ ON posts.id = snaps_tags.record_id
266
+ AND snaps_tags.record_type = 'Post'
267
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
268
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
269
+  (0.0ms) RELEASE SAVEPOINT active_record_1
270
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
271
+ ON posts.id = snaps_tags.record_id
272
+ AND snaps_tags.record_type = 'Post'
273
+ AND snaps_tags.tag = 'published'
274
+  (0.2ms) rollback transaction
275
+  (0.1ms) begin transaction
276
+  (0.0ms) SAVEPOINT active_record_1
277
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
278
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
279
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
280
+ ON posts.id = snaps_tags.record_id
281
+ AND snaps_tags.record_type = 'Post'
282
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
283
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
285
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags" INNER JOIN posts
286
+ ON posts.id = snaps_tags.record_id
287
+ AND snaps_tags.record_type = 'Post'
288
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL
289
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
290
+ ON posts.id = snaps_tags.record_id
291
+ AND snaps_tags.record_type = 'Post'
292
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL)
293
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags" INNER JOIN posts
294
+ ON posts.id = snaps_tags.record_id
295
+ AND snaps_tags.record_type = 'Post'
296
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL
297
+  (0.2ms) rollback transaction
298
+  (0.1ms) begin transaction
299
+  (0.0ms) SAVEPOINT active_record_1
300
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
301
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
302
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
303
+ ON posts.id = snaps_tags.record_id
304
+ AND snaps_tags.record_type = 'Post'
305
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
306
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
307
+  (0.0ms) RELEASE SAVEPOINT active_record_1
308
+  (0.0ms) SAVEPOINT active_record_1
309
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "ein titel"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
310
+  (0.0ms) RELEASE SAVEPOINT active_record_1
311
+  (0.0ms) SAVEPOINT active_record_1
312
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
313
+ ON posts.id = snaps_tags.record_id
314
+ AND snaps_tags.record_type = 'Post'
315
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
316
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
318
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags" INNER JOIN posts
319
+ ON posts.id = snaps_tags.record_id
320
+ AND snaps_tags.record_type = 'Post'
321
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'published' AND "snaps_tags"."superseded_at" IS NULL
322
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
323
+ ON posts.id = snaps_tags.record_id
324
+ AND snaps_tags.record_type = 'Post'
325
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL)
326
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags" INNER JOIN posts
327
+ ON posts.id = snaps_tags.record_id
328
+ AND snaps_tags.record_type = 'Post'
329
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'published' AND "snaps_tags"."superseded_at" IS NULL
330
+  (0.2ms) rollback transaction
331
+  (0.1ms) begin transaction
332
+  (0.0ms) SAVEPOINT active_record_1
333
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
334
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
335
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
336
+ ON posts.id = snaps_tags.record_id
337
+ AND snaps_tags.record_type = 'Post'
338
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
339
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
340
+  (0.0ms) RELEASE SAVEPOINT active_record_1
341
+  (0.0ms) SAVEPOINT active_record_1
342
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
343
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 2], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
344
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
345
+ ON posts.id = snaps_tags.record_id
346
+ AND snaps_tags.record_type = 'Post'
347
+ AND perma_id = 2 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
348
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
350
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags" INNER JOIN posts
351
+ ON posts.id = snaps_tags.record_id
352
+ AND snaps_tags.record_type = 'Post'
353
+ AND perma_id = 2 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL
354
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
355
+ ON posts.id = snaps_tags.record_id
356
+ AND snaps_tags.record_type = 'Post'
357
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL)
358
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags" INNER JOIN posts
359
+ ON posts.id = snaps_tags.record_id
360
+ AND snaps_tags.record_type = 'Post'
361
+ AND perma_id = 2 WHERE "snaps_tags"."tag" = 'draft' AND "snaps_tags"."superseded_at" IS NULL
362
+  (0.2ms) rollback transaction
363
+  (0.1ms) begin transaction
364
+  (0.0ms) SAVEPOINT active_record_1
365
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
366
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "MyString"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
367
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
368
+ ON posts.id = snaps_tags.record_id
369
+ AND snaps_tags.record_type = 'Post'
370
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
371
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
372
+  (0.0ms) RELEASE SAVEPOINT active_record_1
373
+  (0.0ms) SAVEPOINT active_record_1
374
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "MyString"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
375
+  (0.0ms) RELEASE SAVEPOINT active_record_1
376
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."perma_id" = ? [["perma_id", 1]]
377
+  (0.2ms) rollback transaction
378
+  (0.1ms) begin transaction
379
+  (0.0ms) SAVEPOINT active_record_1
380
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
381
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
382
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
383
+ ON posts.id = snaps_tags.record_id
384
+ AND snaps_tags.record_type = 'Post'
385
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
386
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
387
+  (0.0ms) RELEASE SAVEPOINT active_record_1
388
+  (0.0ms) SAVEPOINT active_record_1
389
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "zwei titel"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
390
+  (0.0ms) RELEASE SAVEPOINT active_record_1
391
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 2]]
392
+  (0.2ms) rollback transaction
393
+  (0.2ms) begin transaction
394
+  (0.0ms) SAVEPOINT active_record_1
395
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
396
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
397
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
398
+ ON posts.id = snaps_tags.record_id
399
+ AND snaps_tags.record_type = 'PostWithSections'
400
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
401
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "PostWithSections"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
402
+  (0.0ms) RELEASE SAVEPOINT active_record_1
403
+  (0.0ms) SAVEPOINT active_record_1
404
+  (0.0ms) SELECT MAX("sections"."perma_id") FROM "sections"
405
+ SQL (0.0ms) INSERT INTO "sections" ("title", "post_id", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "section"], ["post_id", 1], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
407
+  (0.0ms) SAVEPOINT active_record_1
408
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "ein titel"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
410
+ Section Load (0.0ms) SELECT "sections".* FROM "sections" WHERE "sections"."post_id" = ? [["post_id", 1]]
411
+  (0.0ms) SAVEPOINT active_record_1
412
+ SQL (0.0ms) INSERT INTO "sections" ("post_id", "perma_id", "title", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["post_id", 2], ["perma_id", 1], ["title", "section"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
413
+  (0.0ms) RELEASE SAVEPOINT active_record_1
414
+ Section Load (0.0ms) SELECT "sections".* FROM "sections" WHERE "sections"."post_id" = ? [["post_id", 2]]
415
+  (0.2ms) rollback transaction
416
+  (0.1ms) begin transaction
417
+  (0.0ms) SAVEPOINT active_record_1
418
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
419
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
420
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
421
+ ON posts.id = snaps_tags.record_id
422
+ AND snaps_tags.record_type = 'Post'
423
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
424
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
425
+  (0.0ms) RELEASE SAVEPOINT active_record_1
426
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags"
427
+  (0.0ms) SAVEPOINT active_record_1
428
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "ein titel"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
429
+  (0.0ms) RELEASE SAVEPOINT active_record_1
430
+  (0.0ms) SELECT COUNT(*) FROM "snaps_tags"
431
+  (0.2ms) rollback transaction
432
+  (0.1ms) begin transaction
433
+  (0.0ms) SAVEPOINT active_record_1
434
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
435
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
436
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
437
+ ON posts.id = snaps_tags.record_id
438
+ AND snaps_tags.record_type = 'Post'
439
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
440
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
441
+  (0.0ms) RELEASE SAVEPOINT active_record_1
442
+  (0.0ms) SAVEPOINT active_record_1
443
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "ein titel"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
445
+  (0.0ms) SAVEPOINT active_record_1
446
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
447
+ ON posts.id = snaps_tags.record_id
448
+ AND snaps_tags.record_type = 'Post'
449
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
450
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Post"], ["tag", "published"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
452
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" INNER JOIN snaps_tags
453
+ ON posts.id = snaps_tags.record_id
454
+ AND snaps_tags.record_type = 'Post'
455
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) ORDER BY "posts"."id" ASC LIMIT 1
456
+  (0.2ms) rollback transaction
457
+  (0.1ms) begin transaction
458
+  (0.0ms) SAVEPOINT active_record_1
459
+  (0.0ms) SELECT MAX("posts"."perma_id") FROM "posts"
460
+ SQL (0.0ms) INSERT INTO "posts" ("title", "body", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "ein titel"], ["body", "MyText"], ["perma_id", 1], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
461
+ SQL (0.0ms) UPDATE "snaps_tags" SET "superseded_at" = '2012-12-31 23:00:00.000000' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN posts
462
+ ON posts.id = snaps_tags.record_id
463
+ AND snaps_tags.record_type = 'Post'
464
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
465
+ SQL (0.0ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Post"], ["tag", "draft"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
467
+  (0.0ms) SAVEPOINT active_record_1
468
+ SQL (0.0ms) INSERT INTO "posts" ("perma_id", "title", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["perma_id", 1], ["title", "ein titel"], ["body", "MyText"], ["created_at", "2012-12-31 23:00:00.000000"], ["updated_at", "2012-12-31 23:00:00.000000"]]
469
+  (0.0ms) RELEASE SAVEPOINT active_record_1
470
+ Post Load (0.0ms) SELECT "posts".* FROM "posts"
471
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT 1
472
+  (0.2ms) rollback transaction