disclaimer 0.0.7 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,13 @@
1
1
  module Disclaimer
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
4
4
 
5
5
  # History
6
6
  #
7
+ # 0.1.0 - Moves app to beta
8
+ # -------------------------
9
+ # Makes app ready for beta release
10
+ #
7
11
  # 0.0.7 - Fixes redirect when app hosted in sub uri
8
12
  # -------------------------------------------------
9
13
  # Version 0.0.6 fixed the redirect to the disclaimer page, but the return from
@@ -0,0 +1,23 @@
1
+ Connecting to database specified by database.yml
2
+  (25.0ms) select sqlite_version(*)
3
+  (204.5ms) CREATE TABLE "disclaimer_documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "name" varchar(255), "header" text, "footer" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4
+  (211.2ms) CREATE TABLE "disclaimer_segment_holders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_id" integer, "segment_id" integer, "position" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
5
+  (155.0ms) CREATE TABLE "disclaimer_segments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "title" varchar(255), "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
6
+  (170.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
7
+  (0.2ms) PRAGMA index_list("schema_migrations")
8
+  (173.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
9
+  (0.3ms) SELECT version FROM "schema_migrations"
10
+  (148.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20121024080818')
11
+  (124.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20121024074240')
12
+  (99.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20121023125748')
13
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
14
+ Connecting to database specified by database.yml
15
+  (23.9ms) select sqlite_version(*)
16
+  (173.2ms) DROP TABLE "disclaimer_documents"
17
+  (158.6ms) CREATE TABLE "disclaimer_documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "name" varchar(255), "header" text, "footer" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
18
+  (144.9ms) DROP TABLE "disclaimer_segment_holders"
19
+  (157.5ms) CREATE TABLE "disclaimer_segment_holders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_id" integer, "segment_id" integer, "position" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
20
+  (165.1ms) DROP TABLE "disclaimer_segments"
21
+  (157.9ms) CREATE TABLE "disclaimer_segments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "title" varchar(255), "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
22
+  (3.1ms) SELECT version FROM "schema_migrations"
23
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
@@ -0,0 +1,1353 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+ Connecting to database specified by database.yml
4
+ Connecting to database specified by database.yml
5
+  (0.1ms) select sqlite_version(*)
6
+  (190.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
7
+  (0.1ms) PRAGMA index_list("schema_migrations")
8
+  (199.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
9
+  (0.4ms) select sqlite_version(*)
10
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
11
+ Connecting to database specified by database.yml
12
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
13
+ Migrating to CreateDisclaimerDocuments (20121023125748)
14
+  (0.1ms) select sqlite_version(*)
15
+  (0.1ms) begin transaction
16
+  (12.7ms) CREATE TABLE "disclaimer_documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "name" varchar(255), "header" text, "footer" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
17
+  (2.3ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121023125748')
18
+  (148.2ms) commit transaction
19
+ Migrating to CreateSegments (20121024074240)
20
+  (0.1ms) begin transaction
21
+  (0.9ms) CREATE TABLE "disclaimer_segments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "title" varchar(255), "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
22
+  (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121024074240')
23
+  (188.2ms) commit transaction
24
+ Migrating to CreateDisclaimerSegmentHolders (20121024080818)
25
+  (0.1ms) begin transaction
26
+  (0.9ms) CREATE TABLE "disclaimer_segment_holders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "document_id" integer, "segment_id" integer, "position" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
27
+  (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121024080818')
28
+  (159.8ms) commit transaction
29
+  (0.8ms) select sqlite_version(*)
30
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
31
+  (0.1ms) PRAGMA index_list("disclaimer_documents")
32
+  (0.1ms) PRAGMA index_list("disclaimer_segment_holders")
33
+  (0.1ms) PRAGMA index_list("disclaimer_segments")
34
+ Connecting to database specified by database.yml
35
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
36
+  (0.1ms) begin transaction
37
+ Fixture Delete (3.5ms) DELETE FROM "disclaimer_documents"
38
+ Fixture Insert (6.9ms) INSERT INTO "disclaimer_documents" ("id", "name", "title", "header", "footer", "created_at", "updated_at") VALUES (1, 'one', 'A Disclaimer', 'You must read my disclaimer', 'Disclaimer bottom', '2013-06-07 10:11:50', '2013-06-07 10:11:50')
39
+ Fixture Delete (5.0ms) DELETE FROM "disclaimer_segment_holders"
40
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segment_holders" ("document_id", "segment_id", "position", "created_at", "updated_at", "id") VALUES (1, 1, 1, '2013-06-07 10:11:50', '2013-06-07 10:11:50', 980190962)
41
+ Fixture Insert (0.2ms) INSERT INTO "disclaimer_segment_holders" ("document_id", "segment_id", "position", "created_at", "updated_at", "id") VALUES (1, 2, 2, '2013-06-07 10:11:50', '2013-06-07 10:11:50', 298486374)
42
+ Fixture Delete (0.6ms) DELETE FROM "disclaimer_segments"
43
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segments" ("id", "name", "title", "body", "created_at", "updated_at") VALUES (1, 'one', 'MyString', 'MyText', '2013-06-07 10:11:50', '2013-06-07 10:11:50')
44
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segments" ("id", "name", "title", "body", "created_at", "updated_at") VALUES (2, 'two', 'MyString', 'MyText', '2013-06-07 10:11:50', '2013-06-07 10:11:50')
45
+  (175.8ms) commit transaction
46
+  (0.1ms) begin transaction
47
+ Disclaimer::Document Load (2.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
48
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
49
+  (0.1ms) SAVEPOINT active_record_1
50
+  (0.7ms) UPDATE "disclaimer_documents" SET "name" = 'this_is_a_name', "updated_at" = '2013-06-07 10:11:51.159320' WHERE "disclaimer_documents"."id" = 1
51
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52
+  (0.6ms) rollback transaction
53
+  (0.1ms) begin transaction
54
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
55
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
56
+ Disclaimer::SegmentHolder Load (0.4ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
57
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
58
+  (0.2ms) rollback transaction
59
+  (0.7ms) begin transaction
60
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
61
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
62
+  (0.1ms) rollback transaction
63
+  (0.1ms) begin transaction
64
+ Disclaimer::Document Load (1.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
65
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
66
+  (0.1ms) rollback transaction
67
+  (0.1ms) begin transaction
68
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
69
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
70
+  (0.1ms) rollback transaction
71
+  (0.1ms) begin transaction
72
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
73
+ Processing by Disclaimer::DocumentsController#accept as HTML
74
+ Parameters: {"id"=>"one"}
75
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
76
+ Redirected to http://test.host
77
+ Completed 302 Found in 27ms (ActiveRecord: 0.2ms)
78
+  (0.1ms) rollback transaction
79
+  (0.1ms) begin transaction
80
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
81
+ Processing by Disclaimer::DocumentsController#accept as HTML
82
+ Parameters: {"id"=>"one"}
83
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
84
+ Redirected to http://test.host/disclaimer/documents
85
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
86
+  (0.1ms) rollback transaction
87
+  (0.1ms) begin transaction
88
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
89
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
90
+ Processing by Disclaimer::DocumentsController#update as HTML
91
+ Parameters: {"id"=>"one", "document"=>{"segments"=>{2=>"yes"}}}
92
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
93
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
94
+  (0.1ms) SAVEPOINT active_record_1
95
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
96
+ SQL (4.7ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1
97
+  (0.1ms) RELEASE SAVEPOINT active_record_1
98
+ Redirected to http://test.host/disclaimer/documents/one
99
+ Completed 302 Found in 243ms (ActiveRecord: 5.8ms)
100
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
101
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
102
+  (15.6ms) rollback transaction
103
+  (0.1ms) begin transaction
104
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
105
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
106
+ Processing by Disclaimer::DocumentsController#update as HTML
107
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
108
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
109
+  (0.1ms) SAVEPOINT active_record_1
110
+ Disclaimer::Segment Load (0.4ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
111
+ SQL (12.2ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
112
+  (0.1ms) RELEASE SAVEPOINT active_record_1
113
+ Redirected to http://test.host/disclaimer/documents/one
114
+ Completed 302 Found in 26ms (ActiveRecord: 13.0ms)
115
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
116
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
117
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" LIMIT 1
118
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
119
+ Processing by Disclaimer::DocumentsController#update as HTML
120
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
121
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
122
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
123
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
124
+  (0.1ms) SAVEPOINT active_record_1
125
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
126
+ Disclaimer::SegmentHolder Load (7.5ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
127
+ SQL (5.7ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00], ["document_id", 1], ["position", 1], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00]]
128
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
129
+ SQL (0.2ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00], ["document_id", 1], ["position", 2], ["segment_id", 2], ["updated_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00]]
130
+  (0.2ms) RELEASE SAVEPOINT active_record_1
131
+ Redirected to http://test.host/disclaimer/documents/one
132
+ Completed 302 Found in 90ms (ActiveRecord: 14.7ms)
133
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
134
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
135
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
136
+ Processing by Disclaimer::DocumentsController#update as HTML
137
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
138
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
139
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
140
+  (0.1ms) SAVEPOINT active_record_1
141
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
142
+ SQL (0.3ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1
143
+  (0.1ms) RELEASE SAVEPOINT active_record_1
144
+ Redirected to http://test.host/disclaimer/documents/one
145
+ Completed 302 Found in 22ms (ActiveRecord: 1.0ms)
146
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
147
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
148
+  (6.5ms) rollback transaction
149
+  (0.1ms) begin transaction
150
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
151
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
152
+ Processing by Disclaimer::DocumentsController#update as HTML
153
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
154
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
155
+  (0.1ms) SAVEPOINT active_record_1
156
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
157
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
158
+  (0.1ms) RELEASE SAVEPOINT active_record_1
159
+ Redirected to http://test.host/disclaimer/documents/one
160
+ Completed 302 Found in 28ms (ActiveRecord: 1.2ms)
161
+ Disclaimer::Document Load (4.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
162
+ Disclaimer::Segment Load (0.4ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
163
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" LIMIT 1
164
+ Disclaimer::Segment Load (1.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
165
+ Processing by Disclaimer::DocumentsController#update as HTML
166
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
167
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
168
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
169
+ Disclaimer::Segment Load (10.8ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
170
+  (0.1ms) SAVEPOINT active_record_1
171
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
172
+ Disclaimer::SegmentHolder Load (0.1ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
173
+ SQL (10.8ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00], ["document_id", 1], ["position", 1], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00]]
174
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
175
+ SQL (0.2ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00], ["document_id", 1], ["position", 2], ["segment_id", 2], ["updated_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00]]
176
+  (0.1ms) RELEASE SAVEPOINT active_record_1
177
+ Redirected to http://test.host/disclaimer/documents/one
178
+ Completed 302 Found in 45ms (ActiveRecord: 22.9ms)
179
+ Disclaimer::Document Load (4.9ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
180
+ Disclaimer::Segment Load (0.4ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
181
+  (9.2ms) rollback transaction
182
+  (0.1ms) begin transaction
183
+ Disclaimer::Document Load (3.7ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
184
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
185
+ Processing by Disclaimer::DocumentsController#create as HTML
186
+ Parameters: {"document"=>{"title"=>"Create document", "name"=>"new document"}}
187
+  (0.1ms) SAVEPOINT active_record_1
188
+ SQL (10.8ms) INSERT INTO "disclaimer_documents" ("created_at", "footer", "header", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00], ["footer", nil], ["header", nil], ["name", "new_document"], ["title", "Create document"], ["updated_at", Fri, 07 Jun 2013 10:11:52 UTC +00:00]]
189
+  (0.1ms) RELEASE SAVEPOINT active_record_1
190
+ Redirected to http://test.host/disclaimer/documents/new_document
191
+ Completed 302 Found in 22ms (ActiveRecord: 11.0ms)
192
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
193
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" ORDER BY "disclaimer_documents"."id" DESC LIMIT 1
194
+  (1.0ms) rollback transaction
195
+  (0.1ms) begin transaction
196
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
197
+ Processing by Disclaimer::DocumentsController#delete as HTML
198
+ Parameters: {"id"=>"one"}
199
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
200
+ Completed 200 OK in 172ms (Views: 166.2ms | ActiveRecord: 0.2ms)
201
+  (0.1ms) rollback transaction
202
+  (0.1ms) begin transaction
203
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
204
+  (12.3ms) SELECT COUNT(*) FROM "disclaimer_documents" 
205
+ Processing by Disclaimer::DocumentsController#destroy as HTML
206
+ Parameters: {"id"=>"one"}
207
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
208
+  (0.1ms) SAVEPOINT active_record_1
209
+ SQL (0.9ms) DELETE FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? [["id", 1]]
210
+  (0.1ms) RELEASE SAVEPOINT active_record_1
211
+ Redirected to http://test.host/disclaimer/
212
+ Completed 302 Found in 14ms (ActiveRecord: 1.2ms)
213
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
214
+  (0.9ms) rollback transaction
215
+  (0.1ms) begin transaction
216
+ Disclaimer::Document Load (0.8ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
217
+ Processing by Disclaimer::DocumentsController#edit as HTML
218
+ Parameters: {"id"=>"one"}
219
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
220
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" 
221
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segments"."id" = 1 LIMIT 1
222
+ Disclaimer::Segment Exists (7.8ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segments"."id" = 2 LIMIT 1
223
+ Completed 200 OK in 122ms (Views: 111.5ms | ActiveRecord: 8.5ms)
224
+  (0.1ms) rollback transaction
225
+  (0.1ms) begin transaction
226
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
227
+ Processing by Disclaimer::DocumentsController#index as HTML
228
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" 
229
+ Disclaimer::Segment Load (0.6ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
230
+ Completed 200 OK in 33ms (Views: 31.7ms | ActiveRecord: 0.8ms)
231
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" 
232
+  (0.1ms) rollback transaction
233
+  (0.1ms) begin transaction
234
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
235
+ Processing by Disclaimer::DocumentsController#new as HTML
236
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" 
237
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" IS NULL AND "disclaimer_segments"."id" = 1 LIMIT 1
238
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" IS NULL AND "disclaimer_segments"."id" = 2 LIMIT 1
239
+ Completed 200 OK in 44ms (Views: 43.3ms | ActiveRecord: 0.5ms)
240
+  (0.2ms) rollback transaction
241
+  (0.1ms) begin transaction
242
+ Disclaimer::Document Load (0.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
243
+ Processing by Disclaimer::DocumentsController#show as HTML
244
+ Parameters: {"id"=>"one"}
245
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
246
+ Disclaimer::Segment Load (5.8ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
247
+ Completed 200 OK in 54ms (Views: 35.1ms | ActiveRecord: 5.9ms)
248
+  (0.1ms) rollback transaction
249
+  (0.1ms) begin transaction
250
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
251
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
252
+ Processing by Disclaimer::DocumentsController#update as HTML
253
+ Parameters: {"id"=>"one", "document"=>{"title"=>"Document update"}}
254
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
255
+  (0.1ms) SAVEPOINT active_record_1
256
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
257
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
258
+  (9.0ms) UPDATE "disclaimer_documents" SET "title" = 'Document update', "updated_at" = '2013-06-07 10:11:52.929762' WHERE "disclaimer_documents"."id" = 1
259
+  (0.1ms) RELEASE SAVEPOINT active_record_1
260
+ Redirected to http://test.host/disclaimer/documents/one
261
+ Completed 302 Found in 24ms (ActiveRecord: 10.0ms)
262
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
263
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
264
+  (4.4ms) rollback transaction
265
+  (0.1ms) begin transaction
266
+ Disclaimer::Document Load (6.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
267
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
268
+ Processing by Disclaimer::DocumentsController#update as HTML
269
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
270
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
271
+  (0.1ms) SAVEPOINT active_record_1
272
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
273
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
274
+  (0.3ms) RELEASE SAVEPOINT active_record_1
275
+ Redirected to http://test.host/disclaimer/documents/one
276
+ Completed 302 Found in 17ms (ActiveRecord: 1.2ms)
277
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
278
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
279
+  (13.7ms) rollback transaction
280
+  (0.1ms) begin transaction
281
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
282
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
283
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
284
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
285
+  (0.1ms) SAVEPOINT active_record_1
286
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
287
+ SQL (0.8ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:11:53 UTC +00:00], ["document_id", 1], ["position", 3], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:11:53 UTC +00:00]]
288
+  (0.4ms) RELEASE SAVEPOINT active_record_1
289
+  (0.8ms) rollback transaction
290
+  (0.2ms) begin transaction
291
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
292
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
293
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
294
+  (0.1ms) SAVEPOINT active_record_1
295
+  (1.1ms) UPDATE "disclaimer_segments" SET "name" = 'this_is_a_name', "updated_at" = '2013-06-07 10:11:53.066880' WHERE "disclaimer_segments"."id" = 1
296
+  (0.1ms) RELEASE SAVEPOINT active_record_1
297
+  (14.5ms) rollback transaction
298
+  (0.1ms) begin transaction
299
+ Disclaimer::Document Load (10.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
300
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
301
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
302
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
303
+ Disclaimer::SegmentHolder Load (0.1ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 2 ORDER BY position LIMIT 1
304
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
305
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
306
+  (0.1ms) rollback transaction
307
+  (0.1ms) begin transaction
308
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
309
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
310
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
311
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
312
+  (0.1ms) SAVEPOINT active_record_1
313
+ SQL (7.1ms) UPDATE "disclaimer_segment_holders" SET position = (position - 1) WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position > 1)
314
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND id != 980190962) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
315
+  (0.5ms) UPDATE "disclaimer_segment_holders" SET "position" = 2, "updated_at" = '2013-06-07 10:11:53.142608' WHERE "disclaimer_segment_holders"."id" = 980190962
316
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position = 2)
317
+  (12.4ms) RELEASE SAVEPOINT active_record_1
318
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
319
+  (0.7ms) rollback transaction
320
+  (0.1ms) begin transaction
321
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
322
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
323
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
324
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IS NULL ORDER BY position LIMIT 1
325
+  (0.1ms) rollback transaction
326
+  (0.1ms) begin transaction
327
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
328
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
329
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
330
+ Disclaimer::SegmentHolder Load (8.6ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position LIMIT 1
331
+  (0.1ms) SAVEPOINT active_record_1
332
+ SQL (0.5ms) UPDATE "disclaimer_segment_holders" SET position = (position - 1) WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position > 1)
333
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND id != 980190962) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
334
+  (8.7ms) UPDATE "disclaimer_segment_holders" SET "position" = 2, "updated_at" = '2013-06-07 10:11:53.205303' WHERE "disclaimer_segment_holders"."id" = 980190962
335
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position = 2)
336
+  (0.1ms) RELEASE SAVEPOINT active_record_1
337
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
338
+  (1.0ms) rollback transaction
339
+  (0.1ms) begin transaction
340
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
341
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
342
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
343
+  (0.1ms) rollback transaction
344
+  (0.1ms) begin transaction
345
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
346
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
347
+ Disclaimer::Segment Load (6.8ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
348
+  (0.2ms) rollback transaction
349
+  (0.1ms) begin transaction
350
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
351
+  (5.5ms) SELECT COUNT(*) FROM "disclaimer_segments"
352
+ Processing by Disclaimer::SegmentsController#create as HTML
353
+ Parameters: {"segment"=>{"title"=>"Create segment", "name"=>"new segment"}}
354
+  (0.2ms) SAVEPOINT active_record_1
355
+ SQL (0.9ms) INSERT INTO "disclaimer_segments" ("body", "created_at", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Fri, 07 Jun 2013 10:11:53 UTC +00:00], ["name", "new_segment"], ["title", "Create segment"], ["updated_at", Fri, 07 Jun 2013 10:11:53 UTC +00:00]]
356
+  (0.1ms) RELEASE SAVEPOINT active_record_1
357
+ Redirected to http://test.host/disclaimer/segments/new_segment
358
+ Completed 302 Found in 19ms (ActiveRecord: 1.2ms)
359
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments"
360
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
361
+  (0.9ms) rollback transaction
362
+  (0.1ms) begin transaction
363
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
364
+ Processing by Disclaimer::SegmentsController#delete as HTML
365
+ Parameters: {"id"=>"one"}
366
+ Disclaimer::Segment Load (0.5ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
367
+ Completed 200 OK in 32ms (Views: 23.5ms | ActiveRecord: 0.5ms)
368
+  (0.1ms) rollback transaction
369
+  (0.1ms) begin transaction
370
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
371
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
372
+ Processing by Disclaimer::SegmentsController#destroy as HTML
373
+ Parameters: {"id"=>"one"}
374
+ Disclaimer::Segment Load (4.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
375
+  (0.1ms) SAVEPOINT active_record_1
376
+ SQL (0.5ms) DELETE FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? [["id", 1]]
377
+  (0.1ms) RELEASE SAVEPOINT active_record_1
378
+ Redirected to http://test.host/disclaimer/segments
379
+ Completed 302 Found in 20ms (ActiveRecord: 5.1ms)
380
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments"
381
+  (5.5ms) rollback transaction
382
+  (0.1ms) begin transaction
383
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
384
+ Processing by Disclaimer::SegmentsController#edit as HTML
385
+ Parameters: {"id"=>"one"}
386
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
387
+ Completed 200 OK in 30ms (Views: 28.4ms | ActiveRecord: 0.2ms)
388
+  (5.4ms) rollback transaction
389
+  (0.1ms) begin transaction
390
+ Disclaimer::Segment Load (0.5ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
391
+ Processing by Disclaimer::SegmentsController#index as HTML
392
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
393
+ Disclaimer::Document Load (0.7ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_documents"."id" = "disclaimer_segment_holders"."document_id" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position
394
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_documents"."id" = "disclaimer_segment_holders"."document_id" WHERE "disclaimer_segment_holders"."segment_id" = 2 ORDER BY position
395
+ Completed 200 OK in 80ms (Views: 68.4ms | ActiveRecord: 1.3ms)
396
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" 
397
+  (5.7ms) rollback transaction
398
+  (0.2ms) begin transaction
399
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
400
+ Processing by Disclaimer::SegmentsController#new as HTML
401
+ Completed 200 OK in 33ms (Views: 23.7ms | ActiveRecord: 0.0ms)
402
+  (0.7ms) rollback transaction
403
+  (0.1ms) begin transaction
404
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
405
+ Processing by Disclaimer::SegmentsController#show as HTML
406
+ Parameters: {"id"=>"one"}
407
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
408
+ Rendered /home/rob/web/disclaimer/app/views/disclaimer/segments/_segment.html.erb (0.7ms)
409
+ Completed 200 OK in 170ms (Views: 163.9ms | ActiveRecord: 0.3ms)
410
+  (0.2ms) rollback transaction
411
+  (0.1ms) begin transaction
412
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
413
+  (0.3ms) SELECT COUNT(*) FROM "disclaimer_segments"
414
+ Processing by Disclaimer::SegmentsController#update as HTML
415
+ Parameters: {"id"=>"one", "segment"=>{"title"=>"Segment update"}}
416
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
417
+  (0.1ms) SAVEPOINT active_record_1
418
+  (0.6ms) UPDATE "disclaimer_segments" SET "title" = 'Segment update', "updated_at" = '2013-06-07 10:11:53.840436' WHERE "disclaimer_segments"."id" = 1
419
+  (0.1ms) RELEASE SAVEPOINT active_record_1
420
+ Redirected to http://test.host/disclaimer/segments/one
421
+ Completed 302 Found in 19ms (ActiveRecord: 1.0ms)
422
+  (0.2ms) SELECT COUNT(*) FROM "disclaimer_segments" 
423
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
424
+  (1.7ms) rollback transaction
425
+  (8.5ms) begin transaction
426
+  (0.1ms) rollback transaction
427
+  (0.1ms) begin transaction
428
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
429
+ Processing by SampleController#bypass_disclaimer as HTML
430
+ Completed 200 OK in 17ms (Views: 16.7ms | ActiveRecord: 0.0ms)
431
+  (0.1ms) rollback transaction
432
+  (0.1ms) begin transaction
433
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
434
+  (0.1ms) SAVEPOINT active_record_1
435
+  (0.7ms) UPDATE "disclaimer_documents" SET "name" = 'something_else', "updated_at" = '2013-06-07 10:11:53.962995' WHERE "disclaimer_documents"."id" = 1
436
+  (0.1ms) RELEASE SAVEPOINT active_record_1
437
+ Processing by SampleController#index as HTML
438
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'nil'
439
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
440
+  (0.7ms) rollback transaction
441
+  (0.1ms) begin transaction
442
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
443
+  (0.1ms) SAVEPOINT active_record_1
444
+  (0.6ms) UPDATE "disclaimer_documents" SET "name" = 'something_else', "updated_at" = '2013-06-07 10:11:54.006637' WHERE "disclaimer_documents"."id" = 1
445
+  (0.1ms) RELEASE SAVEPOINT active_record_1
446
+ Processing by SampleController#index as HTML
447
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'nil'
448
+ Completed 200 OK in 9ms (Views: 8.9ms | ActiveRecord: 0.0ms)
449
+  (0.1ms) SAVEPOINT active_record_1
450
+  (0.8ms) UPDATE "disclaimer_documents" SET "name" = 'one', "updated_at" = '2013-06-07 10:11:54.036931' WHERE "disclaimer_documents"."id" = 1
451
+  (0.1ms) RELEASE SAVEPOINT active_record_1
452
+ Processing by SampleController#index as HTML
453
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'nil'
454
+ Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
455
+  (9.5ms) rollback transaction
456
+  (0.1ms) begin transaction
457
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
458
+ Processing by SampleController#index as HTML
459
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'nil'
460
+ Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms)
461
+  (0.1ms) rollback transaction
462
+  (0.1ms) begin transaction
463
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
464
+ Processing by SampleController#index as HTML
465
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'nil'
466
+ Completed 200 OK in 9ms (Views: 9.1ms | ActiveRecord: 0.0ms)
467
+  (0.1ms) rollback transaction
468
+ Connecting to database specified by database.yml
469
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
470
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
471
+  (0.1ms) begin transaction
472
+ Fixture Delete (9.5ms) DELETE FROM "disclaimer_documents"
473
+ Fixture Insert (2.4ms) INSERT INTO "disclaimer_documents" ("id", "name", "title", "header", "footer", "created_at", "updated_at") VALUES (1, 'one', 'A Disclaimer', 'You must read my disclaimer', 'Disclaimer bottom', '2013-06-07 10:13:29', '2013-06-07 10:13:29')
474
+ Fixture Delete (5.3ms) DELETE FROM "disclaimer_segment_holders"
475
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segment_holders" ("document_id", "segment_id", "position", "created_at", "updated_at", "id") VALUES (1, 1, 1, '2013-06-07 10:13:29', '2013-06-07 10:13:29', 980190962)
476
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segment_holders" ("document_id", "segment_id", "position", "created_at", "updated_at", "id") VALUES (1, 2, 2, '2013-06-07 10:13:29', '2013-06-07 10:13:29', 298486374)
477
+ Fixture Delete (9.2ms) DELETE FROM "disclaimer_segments"
478
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segments" ("id", "name", "title", "body", "created_at", "updated_at") VALUES (1, 'one', 'MyString', 'MyText', '2013-06-07 10:13:29', '2013-06-07 10:13:29')
479
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segments" ("id", "name", "title", "body", "created_at", "updated_at") VALUES (2, 'two', 'MyString', 'MyText', '2013-06-07 10:13:29', '2013-06-07 10:13:29')
480
+  (182.6ms) commit transaction
481
+  (0.1ms) begin transaction
482
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
483
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
484
+  (0.1ms) SAVEPOINT active_record_1
485
+  (2.1ms) UPDATE "disclaimer_documents" SET "name" = 'this_is_a_name', "updated_at" = '2013-06-07 10:13:29.453137' WHERE "disclaimer_documents"."id" = 1
486
+  (0.4ms) RELEASE SAVEPOINT active_record_1
487
+  (1.0ms) rollback transaction
488
+  (0.1ms) begin transaction
489
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
490
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
491
+ Disclaimer::SegmentHolder Load (0.4ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
492
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
493
+  (0.1ms) rollback transaction
494
+  (0.1ms) begin transaction
495
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
496
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
497
+  (0.1ms) rollback transaction
498
+  (0.1ms) begin transaction
499
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
500
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
501
+  (0.1ms) rollback transaction
502
+  (0.2ms) begin transaction
503
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
504
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
505
+  (0.1ms) rollback transaction
506
+  (0.1ms) begin transaction
507
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
508
+ Processing by Disclaimer::DocumentsController#accept as HTML
509
+ Parameters: {"id"=>"one"}
510
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
511
+ Redirected to http://test.host
512
+ Completed 302 Found in 19ms (ActiveRecord: 0.4ms)
513
+  (0.1ms) rollback transaction
514
+  (0.1ms) begin transaction
515
+ Disclaimer::Document Load (0.7ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
516
+ Processing by Disclaimer::DocumentsController#accept as HTML
517
+ Parameters: {"id"=>"one"}
518
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
519
+ Redirected to http://test.host/disclaimer/documents
520
+ Completed 302 Found in 3ms (ActiveRecord: 0.2ms)
521
+  (0.2ms) rollback transaction
522
+  (0.1ms) begin transaction
523
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
524
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
525
+ Processing by Disclaimer::DocumentsController#update as HTML
526
+ Parameters: {"id"=>"one", "document"=>{"segments"=>{2=>"yes"}}}
527
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
528
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
529
+  (0.1ms) SAVEPOINT active_record_1
530
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
531
+ SQL (0.6ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1
532
+  (0.1ms) RELEASE SAVEPOINT active_record_1
533
+ Redirected to http://test.host/disclaimer/documents/one
534
+ Completed 302 Found in 282ms (ActiveRecord: 1.4ms)
535
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
536
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
537
+  (19.3ms) rollback transaction
538
+  (0.1ms) begin transaction
539
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
540
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
541
+ Processing by Disclaimer::DocumentsController#update as HTML
542
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
543
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
544
+  (0.1ms) SAVEPOINT active_record_1
545
+ Disclaimer::Segment Load (8.1ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
546
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
547
+  (0.1ms) RELEASE SAVEPOINT active_record_1
548
+ Redirected to http://test.host/disclaimer/documents/one
549
+ Completed 302 Found in 30ms (ActiveRecord: 9.0ms)
550
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
551
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
552
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" LIMIT 1
553
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
554
+ Processing by Disclaimer::DocumentsController#update as HTML
555
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
556
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
557
+ Disclaimer::Segment Load (13.0ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
558
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
559
+  (0.1ms) SAVEPOINT active_record_1
560
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
561
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
562
+ SQL (1.0ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00], ["document_id", 1], ["position", 1], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00]]
563
+ Disclaimer::SegmentHolder Load (6.3ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
564
+ SQL (0.3ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00], ["document_id", 1], ["position", 2], ["segment_id", 2], ["updated_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00]]
565
+  (0.2ms) RELEASE SAVEPOINT active_record_1
566
+ Redirected to http://test.host/disclaimer/documents/one
567
+ Completed 302 Found in 97ms (ActiveRecord: 21.4ms)
568
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
569
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
570
+ Disclaimer::Segment Load (8.6ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
571
+ Processing by Disclaimer::DocumentsController#update as HTML
572
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
573
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
574
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
575
+  (0.1ms) SAVEPOINT active_record_1
576
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
577
+ SQL (0.3ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1
578
+  (0.1ms) RELEASE SAVEPOINT active_record_1
579
+ Redirected to http://test.host/disclaimer/documents/one
580
+ Completed 302 Found in 50ms (ActiveRecord: 1.1ms)
581
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
582
+ Disclaimer::Segment Load (12.9ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
583
+  (5.3ms) rollback transaction
584
+  (0.1ms) begin transaction
585
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
586
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
587
+ Processing by Disclaimer::DocumentsController#update as HTML
588
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
589
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
590
+  (0.1ms) SAVEPOINT active_record_1
591
+ Disclaimer::Segment Load (0.4ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
592
+ SQL (0.8ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
593
+  (0.1ms) RELEASE SAVEPOINT active_record_1
594
+ Redirected to http://test.host/disclaimer/documents/one
595
+ Completed 302 Found in 28ms (ActiveRecord: 1.6ms)
596
+ Disclaimer::Document Load (4.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
597
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
598
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" LIMIT 1
599
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
600
+ Processing by Disclaimer::DocumentsController#update as HTML
601
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
602
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
603
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
604
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
605
+  (0.1ms) SAVEPOINT active_record_1
606
+ Disclaimer::Segment Load (14.5ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
607
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
608
+ SQL (0.6ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00], ["document_id", 1], ["position", 1], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00]]
609
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
610
+ SQL (13.6ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00], ["document_id", 1], ["position", 2], ["segment_id", 2], ["updated_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00]]
611
+  (0.1ms) RELEASE SAVEPOINT active_record_1
612
+ Redirected to http://test.host/disclaimer/documents/one
613
+ Completed 302 Found in 49ms (ActiveRecord: 29.5ms)
614
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
615
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
616
+  (0.9ms) rollback transaction
617
+  (0.2ms) begin transaction
618
+ Disclaimer::Document Load (0.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
619
+  (7.3ms) SELECT COUNT(*) FROM "disclaimer_documents" 
620
+ Processing by Disclaimer::DocumentsController#create as HTML
621
+ Parameters: {"document"=>{"title"=>"Create document", "name"=>"new document"}}
622
+  (0.1ms) SAVEPOINT active_record_1
623
+ SQL (0.9ms) INSERT INTO "disclaimer_documents" ("created_at", "footer", "header", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00], ["footer", nil], ["header", nil], ["name", "new_document"], ["title", "Create document"], ["updated_at", Fri, 07 Jun 2013 10:13:30 UTC +00:00]]
624
+  (0.1ms) RELEASE SAVEPOINT active_record_1
625
+ Redirected to http://test.host/disclaimer/documents/new_document
626
+ Completed 302 Found in 9ms (ActiveRecord: 1.0ms)
627
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
628
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" ORDER BY "disclaimer_documents"."id" DESC LIMIT 1
629
+  (0.8ms) rollback transaction
630
+  (0.1ms) begin transaction
631
+ Disclaimer::Document Load (0.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
632
+ Processing by Disclaimer::DocumentsController#delete as HTML
633
+ Parameters: {"id"=>"one"}
634
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
635
+ Completed 200 OK in 210ms (Views: 183.5ms | ActiveRecord: 0.2ms)
636
+  (0.1ms) rollback transaction
637
+  (0.1ms) begin transaction
638
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
639
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
640
+ Processing by Disclaimer::DocumentsController#destroy as HTML
641
+ Parameters: {"id"=>"one"}
642
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
643
+  (0.1ms) SAVEPOINT active_record_1
644
+ SQL (0.6ms) DELETE FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? [["id", 1]]
645
+  (0.1ms) RELEASE SAVEPOINT active_record_1
646
+ Redirected to http://test.host/disclaimer/
647
+ Completed 302 Found in 20ms (ActiveRecord: 1.0ms)
648
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
649
+  (6.7ms) rollback transaction
650
+  (0.1ms) begin transaction
651
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
652
+ Processing by Disclaimer::DocumentsController#edit as HTML
653
+ Parameters: {"id"=>"one"}
654
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
655
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
656
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segments"."id" = 1 LIMIT 1
657
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segments"."id" = 2 LIMIT 1
658
+ Completed 200 OK in 88ms (Views: 85.9ms | ActiveRecord: 0.8ms)
659
+  (0.1ms) rollback transaction
660
+  (0.1ms) begin transaction
661
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
662
+ Processing by Disclaimer::DocumentsController#index as HTML
663
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents"
664
+ Disclaimer::Segment Load (10.7ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
665
+ Completed 200 OK in 34ms (Views: 21.7ms | ActiveRecord: 10.9ms)
666
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents"
667
+  (0.1ms) rollback transaction
668
+  (0.1ms) begin transaction
669
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
670
+ Processing by Disclaimer::DocumentsController#new as HTML
671
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
672
+ Disclaimer::Segment Exists (0.3ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" IS NULL AND "disclaimer_segments"."id" = 1 LIMIT 1
673
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" IS NULL AND "disclaimer_segments"."id" = 2 LIMIT 1
674
+ Completed 200 OK in 40ms (Views: 39.4ms | ActiveRecord: 0.6ms)
675
+  (0.1ms) rollback transaction
676
+  (0.1ms) begin transaction
677
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
678
+ Processing by Disclaimer::DocumentsController#show as HTML
679
+ Parameters: {"id"=>"one"}
680
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
681
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
682
+ Completed 200 OK in 45ms (Views: 34.1ms | ActiveRecord: 0.5ms)
683
+  (0.1ms) rollback transaction
684
+  (0.1ms) begin transaction
685
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
686
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
687
+ Processing by Disclaimer::DocumentsController#update as HTML
688
+ Parameters: {"id"=>"one", "document"=>{"title"=>"Document update"}}
689
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
690
+  (0.1ms) SAVEPOINT active_record_1
691
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
692
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
693
+  (6.2ms) UPDATE "disclaimer_documents" SET "title" = 'Document update', "updated_at" = '2013-06-07 10:13:31.316036' WHERE "disclaimer_documents"."id" = 1
694
+  (0.1ms) RELEASE SAVEPOINT active_record_1
695
+ Redirected to http://test.host/disclaimer/documents/one
696
+ Completed 302 Found in 32ms (ActiveRecord: 7.4ms)
697
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
698
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
699
+  (1.8ms) rollback transaction
700
+  (0.1ms) begin transaction
701
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
702
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
703
+ Processing by Disclaimer::DocumentsController#update as HTML
704
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
705
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
706
+  (5.7ms) SAVEPOINT active_record_1
707
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
708
+ SQL (0.6ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
709
+  (0.1ms) RELEASE SAVEPOINT active_record_1
710
+ Redirected to http://test.host/disclaimer/documents/one
711
+ Completed 302 Found in 38ms (ActiveRecord: 6.8ms)
712
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
713
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
714
+  (6.3ms) rollback transaction
715
+  (0.1ms) begin transaction
716
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
717
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
718
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
719
+ Disclaimer::Segment Load (1.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
720
+  (0.1ms) SAVEPOINT active_record_1
721
+ Disclaimer::SegmentHolder Load (2.6ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
722
+ SQL (1.4ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:13:31 UTC +00:00], ["document_id", 1], ["position", 3], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:13:31 UTC +00:00]]
723
+  (0.1ms) RELEASE SAVEPOINT active_record_1
724
+  (0.8ms) rollback transaction
725
+  (0.1ms) begin transaction
726
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
727
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
728
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
729
+  (0.1ms) SAVEPOINT active_record_1
730
+  (3.9ms) UPDATE "disclaimer_segments" SET "name" = 'this_is_a_name', "updated_at" = '2013-06-07 10:13:31.461445' WHERE "disclaimer_segments"."id" = 1
731
+  (0.1ms) RELEASE SAVEPOINT active_record_1
732
+  (0.7ms) rollback transaction
733
+  (0.2ms) begin transaction
734
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
735
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
736
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
737
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
738
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 2 ORDER BY position LIMIT 1
739
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
740
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
741
+  (0.1ms) rollback transaction
742
+  (0.1ms) begin transaction
743
+ Disclaimer::Document Load (0.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
744
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
745
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
746
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
747
+  (0.1ms) SAVEPOINT active_record_1
748
+ SQL (11.0ms) UPDATE "disclaimer_segment_holders" SET position = (position - 1) WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position > 1)
749
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND id != 980190962) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
750
+  (0.5ms) UPDATE "disclaimer_segment_holders" SET "position" = 2, "updated_at" = '2013-06-07 10:13:31.546308' WHERE "disclaimer_segment_holders"."id" = 980190962
751
+  (0.2ms) SELECT COUNT(*) FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position = 2)
752
+  (0.1ms) RELEASE SAVEPOINT active_record_1
753
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
754
+  (2.2ms) rollback transaction
755
+  (0.2ms) begin transaction
756
+ Disclaimer::Document Load (0.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
757
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
758
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
759
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IS NULL ORDER BY position LIMIT 1
760
+  (0.1ms) rollback transaction
761
+  (0.1ms) begin transaction
762
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
763
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
764
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
765
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position LIMIT 1
766
+  (0.1ms) SAVEPOINT active_record_1
767
+ SQL (0.5ms) UPDATE "disclaimer_segment_holders" SET position = (position - 1) WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position > 1)
768
+ Disclaimer::SegmentHolder Load (0.1ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND id != 980190962) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
769
+  (0.6ms) UPDATE "disclaimer_segment_holders" SET "position" = 2, "updated_at" = '2013-06-07 10:13:31.610871' WHERE "disclaimer_segment_holders"."id" = 980190962
770
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position = 2)
771
+  (0.1ms) RELEASE SAVEPOINT active_record_1
772
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
773
+  (0.8ms) rollback transaction
774
+  (0.1ms) begin transaction
775
+ Disclaimer::Document Load (3.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
776
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
777
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
778
+  (0.1ms) rollback transaction
779
+  (0.1ms) begin transaction
780
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
781
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
782
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
783
+  (0.1ms) rollback transaction
784
+  (0.1ms) begin transaction
785
+ Disclaimer::Segment Load (1.0ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
786
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
787
+ Processing by Disclaimer::SegmentsController#create as HTML
788
+ Parameters: {"segment"=>{"title"=>"Create segment", "name"=>"new segment"}}
789
+  (0.1ms) SAVEPOINT active_record_1
790
+ SQL (0.9ms) INSERT INTO "disclaimer_segments" ("body", "created_at", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Fri, 07 Jun 2013 10:13:31 UTC +00:00], ["name", "new_segment"], ["title", "Create segment"], ["updated_at", Fri, 07 Jun 2013 10:13:31 UTC +00:00]]
791
+  (0.1ms) RELEASE SAVEPOINT active_record_1
792
+ Redirected to http://test.host/disclaimer/segments/new_segment
793
+ Completed 302 Found in 18ms (ActiveRecord: 1.1ms)
794
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
795
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
796
+  (3.1ms) rollback transaction
797
+  (0.1ms) begin transaction
798
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
799
+ Processing by Disclaimer::SegmentsController#delete as HTML
800
+ Parameters: {"id"=>"one"}
801
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
802
+ Completed 200 OK in 40ms (Views: 37.6ms | ActiveRecord: 0.2ms)
803
+  (0.1ms) rollback transaction
804
+  (0.1ms) begin transaction
805
+ Disclaimer::Segment Load (0.7ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
806
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments"
807
+ Processing by Disclaimer::SegmentsController#destroy as HTML
808
+ Parameters: {"id"=>"one"}
809
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
810
+  (0.1ms) SAVEPOINT active_record_1
811
+ SQL (0.5ms) DELETE FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? [["id", 1]]
812
+  (0.1ms) RELEASE SAVEPOINT active_record_1
813
+ Redirected to http://test.host/disclaimer/segments
814
+ Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
815
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
816
+  (0.7ms) rollback transaction
817
+  (0.1ms) begin transaction
818
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
819
+ Processing by Disclaimer::SegmentsController#edit as HTML
820
+ Parameters: {"id"=>"one"}
821
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
822
+ Completed 200 OK in 31ms (Views: 29.6ms | ActiveRecord: 0.2ms)
823
+  (0.1ms) rollback transaction
824
+  (0.1ms) begin transaction
825
+ Disclaimer::Segment Load (0.6ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
826
+ Processing by Disclaimer::SegmentsController#index as HTML
827
+ Disclaimer::Segment Load (6.6ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" 
828
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_documents"."id" = "disclaimer_segment_holders"."document_id" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position
829
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_documents"."id" = "disclaimer_segment_holders"."document_id" WHERE "disclaimer_segment_holders"."segment_id" = 2 ORDER BY position
830
+ Completed 200 OK in 68ms (Views: 58.9ms | ActiveRecord: 7.4ms)
831
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
832
+  (0.2ms) rollback transaction
833
+  (0.6ms) begin transaction
834
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
835
+ Processing by Disclaimer::SegmentsController#new as HTML
836
+ Completed 200 OK in 21ms (Views: 20.0ms | ActiveRecord: 0.0ms)
837
+  (0.1ms) rollback transaction
838
+  (0.3ms) begin transaction
839
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
840
+ Processing by Disclaimer::SegmentsController#show as HTML
841
+ Parameters: {"id"=>"one"}
842
+ Disclaimer::Segment Load (0.7ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
843
+ Rendered /home/rob/web/disclaimer/app/views/disclaimer/segments/_segment.html.erb (0.7ms)
844
+ Completed 200 OK in 149ms (Views: 146.1ms | ActiveRecord: 0.7ms)
845
+  (0.3ms) rollback transaction
846
+  (0.1ms) begin transaction
847
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
848
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
849
+ Processing by Disclaimer::SegmentsController#update as HTML
850
+ Parameters: {"id"=>"one", "segment"=>{"title"=>"Segment update"}}
851
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
852
+  (2.1ms) SAVEPOINT active_record_1
853
+  (0.5ms) UPDATE "disclaimer_segments" SET "title" = 'Segment update', "updated_at" = '2013-06-07 10:13:32.225141' WHERE "disclaimer_segments"."id" = 1
854
+  (0.1ms) RELEASE SAVEPOINT active_record_1
855
+ Redirected to http://test.host/disclaimer/segments/one
856
+ Completed 302 Found in 8ms (ActiveRecord: 2.9ms)
857
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments"
858
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
859
+  (11.4ms) rollback transaction
860
+  (0.1ms) begin transaction
861
+  (0.1ms) rollback transaction
862
+  (8.5ms) begin transaction
863
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
864
+ Processing by SampleController#bypass_disclaimer as HTML
865
+ Completed 200 OK in 20ms (Views: 19.1ms | ActiveRecord: 0.0ms)
866
+  (0.1ms) rollback transaction
867
+  (0.1ms) begin transaction
868
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
869
+  (4.3ms) SAVEPOINT active_record_1
870
+  (4.3ms) UPDATE "disclaimer_documents" SET "name" = 'something_else', "updated_at" = '2013-06-07 10:13:32.316478' WHERE "disclaimer_documents"."id" = 1
871
+  (0.1ms) RELEASE SAVEPOINT active_record_1
872
+ Processing by SampleController#index as HTML
873
+ Disclaimer::Document Exists (0.1ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
874
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'one'
875
+ Completed 200 OK in 11ms (Views: 9.0ms | ActiveRecord: 0.1ms)
876
+  (0.9ms) rollback transaction
877
+  (0.1ms) begin transaction
878
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
879
+  (6.3ms) SAVEPOINT active_record_1
880
+  (0.9ms) UPDATE "disclaimer_documents" SET "name" = 'something_else', "updated_at" = '2013-06-07 10:13:32.365058' WHERE "disclaimer_documents"."id" = 1
881
+  (0.1ms) RELEASE SAVEPOINT active_record_1
882
+ Processing by SampleController#index as HTML
883
+ Disclaimer::Document Exists (0.1ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
884
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'one'
885
+ Completed 200 OK in 10ms (Views: 8.4ms | ActiveRecord: 0.1ms)
886
+  (0.1ms) SAVEPOINT active_record_1
887
+  (0.4ms) UPDATE "disclaimer_documents" SET "name" = 'one', "updated_at" = '2013-06-07 10:13:32.390650' WHERE "disclaimer_documents"."id" = 1
888
+  (0.1ms) RELEASE SAVEPOINT active_record_1
889
+ Processing by SampleController#index as HTML
890
+ Disclaimer::Document Exists (9.9ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
891
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
892
+ Redirected to http://test.host/disclaimer/documents/one
893
+ Filter chain halted as #<Proc:0x9fc0784@/home/rob/web/disclaimer/lib/rails/actionpack/lib/action_controller/base.rb:7> rendered or redirected
894
+ Completed 302 Found in 25ms (Views: 8.4ms | ActiveRecord: 10.5ms)
895
+  (0.8ms) rollback transaction
896
+  (0.1ms) begin transaction
897
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
898
+ Processing by SampleController#index as HTML
899
+ Disclaimer::Document Exists (1.2ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
900
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
901
+ Redirected to http://test.host/disclaimer/documents/one
902
+ Filter chain halted as #<Proc:0x9fc0784@/home/rob/web/disclaimer/lib/rails/actionpack/lib/action_controller/base.rb:7> rendered or redirected
903
+ Completed 302 Found in 12ms (ActiveRecord: 1.4ms)
904
+  (0.1ms) rollback transaction
905
+  (0.1ms) begin transaction
906
+ Disclaimer::Document Load (4.7ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
907
+ Processing by SampleController#index as HTML
908
+ Disclaimer::Document Exists (0.5ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
909
+ Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.5ms)
910
+  (0.1ms) rollback transaction
911
+ Connecting to database specified by database.yml
912
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
913
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
914
+  (0.1ms) begin transaction
915
+ Fixture Delete (3.6ms) DELETE FROM "disclaimer_documents"
916
+ Fixture Insert (2.8ms) INSERT INTO "disclaimer_documents" ("id", "name", "title", "header", "footer", "created_at", "updated_at") VALUES (1, 'one', 'A Disclaimer', 'You must read my disclaimer', 'Disclaimer bottom', '2013-06-07 10:14:19', '2013-06-07 10:14:19')
917
+ Fixture Delete (0.3ms) DELETE FROM "disclaimer_segment_holders"
918
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segment_holders" ("document_id", "segment_id", "position", "created_at", "updated_at", "id") VALUES (1, 1, 1, '2013-06-07 10:14:19', '2013-06-07 10:14:19', 980190962)
919
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segment_holders" ("document_id", "segment_id", "position", "created_at", "updated_at", "id") VALUES (1, 2, 2, '2013-06-07 10:14:19', '2013-06-07 10:14:19', 298486374)
920
+ Fixture Delete (3.7ms) DELETE FROM "disclaimer_segments"
921
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segments" ("id", "name", "title", "body", "created_at", "updated_at") VALUES (1, 'one', 'MyString', 'MyText', '2013-06-07 10:14:19', '2013-06-07 10:14:19')
922
+ Fixture Insert (0.1ms) INSERT INTO "disclaimer_segments" ("id", "name", "title", "body", "created_at", "updated_at") VALUES (2, 'two', 'MyString', 'MyText', '2013-06-07 10:14:19', '2013-06-07 10:14:19')
923
+  (172.7ms) commit transaction
924
+  (0.1ms) begin transaction
925
+ Disclaimer::Document Load (0.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
926
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
927
+  (0.1ms) SAVEPOINT active_record_1
928
+  (2.3ms) UPDATE "disclaimer_documents" SET "name" = 'this_is_a_name', "updated_at" = '2013-06-07 10:14:19.459015' WHERE "disclaimer_documents"."id" = 1
929
+  (0.1ms) RELEASE SAVEPOINT active_record_1
930
+  (1.2ms) rollback transaction
931
+  (0.1ms) begin transaction
932
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
933
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
934
+ Disclaimer::SegmentHolder Load (0.4ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
935
+ Disclaimer::SegmentHolder Load (0.9ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
936
+  (0.1ms) rollback transaction
937
+  (0.1ms) begin transaction
938
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
939
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
940
+  (0.3ms) rollback transaction
941
+  (0.1ms) begin transaction
942
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
943
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
944
+  (0.9ms) rollback transaction
945
+  (0.1ms) begin transaction
946
+ Disclaimer::Document Load (0.7ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
947
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
948
+  (0.1ms) rollback transaction
949
+  (0.1ms) begin transaction
950
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
951
+ Processing by Disclaimer::DocumentsController#accept as HTML
952
+ Parameters: {"id"=>"one"}
953
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
954
+ Redirected to http://test.host
955
+ Completed 302 Found in 13ms (ActiveRecord: 0.2ms)
956
+  (0.1ms) rollback transaction
957
+  (0.3ms) begin transaction
958
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
959
+ Processing by Disclaimer::DocumentsController#accept as HTML
960
+ Parameters: {"id"=>"one"}
961
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
962
+ Redirected to http://test.host/disclaimer/documents
963
+ Completed 302 Found in 6ms (ActiveRecord: 0.2ms)
964
+  (0.1ms) rollback transaction
965
+  (0.1ms) begin transaction
966
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
967
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
968
+ Processing by Disclaimer::DocumentsController#update as HTML
969
+ Parameters: {"id"=>"one", "document"=>{"segments"=>{2=>"yes"}}}
970
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
971
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
972
+  (0.1ms) SAVEPOINT active_record_1
973
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
974
+ SQL (0.9ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1
975
+  (0.1ms) RELEASE SAVEPOINT active_record_1
976
+ Redirected to http://test.host/disclaimer/documents/one
977
+ Completed 302 Found in 194ms (ActiveRecord: 1.8ms)
978
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
979
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
980
+  (13.0ms) rollback transaction
981
+  (0.1ms) begin transaction
982
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
983
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
984
+ Processing by Disclaimer::DocumentsController#update as HTML
985
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
986
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
987
+  (0.1ms) SAVEPOINT active_record_1
988
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
989
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
990
+  (0.2ms) RELEASE SAVEPOINT active_record_1
991
+ Redirected to http://test.host/disclaimer/documents/one
992
+ Completed 302 Found in 35ms (ActiveRecord: 1.3ms)
993
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
994
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
995
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" LIMIT 1
996
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
997
+ Processing by Disclaimer::DocumentsController#update as HTML
998
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
999
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1000
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1001
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1002
+  (0.1ms) SAVEPOINT active_record_1
1003
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1004
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1005
+ SQL (0.8ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00], ["document_id", 1], ["position", 1], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00]]
1006
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1007
+ SQL (0.2ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00], ["document_id", 1], ["position", 2], ["segment_id", 2], ["updated_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00]]
1008
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1009
+ Redirected to http://test.host/disclaimer/documents/one
1010
+ Completed 302 Found in 118ms (ActiveRecord: 2.1ms)
1011
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1012
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1013
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
1014
+ Processing by Disclaimer::DocumentsController#update as HTML
1015
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
1016
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1017
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1018
+  (12.3ms) SAVEPOINT active_record_1
1019
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1020
+ SQL (0.2ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1
1021
+  (12.3ms) RELEASE SAVEPOINT active_record_1
1022
+ Redirected to http://test.host/disclaimer/documents/one
1023
+ Completed 302 Found in 31ms (ActiveRecord: 25.3ms)
1024
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1025
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1026
+  (13.3ms) rollback transaction
1027
+  (0.1ms) begin transaction
1028
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1029
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1030
+ Processing by Disclaimer::DocumentsController#update as HTML
1031
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
1032
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1033
+  (0.1ms) SAVEPOINT active_record_1
1034
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1035
+ SQL (13.2ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
1036
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1037
+ Redirected to http://test.host/disclaimer/documents/one
1038
+ Completed 302 Found in 24ms (ActiveRecord: 13.9ms)
1039
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1040
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1041
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" LIMIT 1
1042
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
1043
+ Processing by Disclaimer::DocumentsController#update as HTML
1044
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
1045
+ Disclaimer::Document Load (12.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1046
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1047
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1048
+  (0.1ms) SAVEPOINT active_record_1
1049
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1050
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1051
+ SQL (0.8ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00], ["document_id", 1], ["position", 1], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00]]
1052
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1053
+ SQL (0.2ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00], ["document_id", 1], ["position", 2], ["segment_id", 2], ["updated_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00]]
1054
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1055
+ Redirected to http://test.host/disclaimer/documents/one
1056
+ Completed 302 Found in 61ms (ActiveRecord: 14.1ms)
1057
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1058
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1059
+  (3.2ms) rollback transaction
1060
+  (0.1ms) begin transaction
1061
+ Disclaimer::Document Load (1.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1062
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
1063
+ Processing by Disclaimer::DocumentsController#create as HTML
1064
+ Parameters: {"document"=>{"title"=>"Create document", "name"=>"new document"}}
1065
+  (0.1ms) SAVEPOINT active_record_1
1066
+ SQL (4.5ms) INSERT INTO "disclaimer_documents" ("created_at", "footer", "header", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00], ["footer", nil], ["header", nil], ["name", "new_document"], ["title", "Create document"], ["updated_at", Fri, 07 Jun 2013 10:14:20 UTC +00:00]]
1067
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1068
+ Redirected to http://test.host/disclaimer/documents/new_document
1069
+ Completed 302 Found in 10ms (ActiveRecord: 4.6ms)
1070
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
1071
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" ORDER BY "disclaimer_documents"."id" DESC LIMIT 1
1072
+  (1.2ms) rollback transaction
1073
+  (0.1ms) begin transaction
1074
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1075
+ Processing by Disclaimer::DocumentsController#delete as HTML
1076
+ Parameters: {"id"=>"one"}
1077
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1078
+ Completed 200 OK in 155ms (Views: 153.1ms | ActiveRecord: 0.2ms)
1079
+  (0.1ms) rollback transaction
1080
+  (0.1ms) begin transaction
1081
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1082
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents"
1083
+ Processing by Disclaimer::DocumentsController#destroy as HTML
1084
+ Parameters: {"id"=>"one"}
1085
+ Disclaimer::Document Load (4.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1086
+  (0.1ms) SAVEPOINT active_record_1
1087
+ SQL (0.5ms) DELETE FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? [["id", 1]]
1088
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1089
+ Redirected to http://test.host/disclaimer/
1090
+ Completed 302 Found in 21ms (ActiveRecord: 5.2ms)
1091
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
1092
+  (0.7ms) rollback transaction
1093
+  (0.2ms) begin transaction
1094
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1095
+ Processing by Disclaimer::DocumentsController#edit as HTML
1096
+ Parameters: {"id"=>"one"}
1097
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1098
+ Disclaimer::Segment Load (10.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
1099
+ Disclaimer::Segment Exists (0.2ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segments"."id" = 1 LIMIT 1
1100
+ Disclaimer::Segment Exists (0.1ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segments"."id" = 2 LIMIT 1
1101
+ Completed 200 OK in 73ms (Views: 48.1ms | ActiveRecord: 11.0ms)
1102
+  (0.2ms) rollback transaction
1103
+  (0.3ms) begin transaction
1104
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1105
+ Processing by Disclaimer::DocumentsController#index as HTML
1106
+ Disclaimer::Document Load (16.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents"
1107
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1108
+ Completed 200 OK in 38ms (Views: 19.8ms | ActiveRecord: 16.5ms)
1109
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents"
1110
+  (0.1ms) rollback transaction
1111
+  (0.1ms) begin transaction
1112
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1113
+ Processing by Disclaimer::DocumentsController#new as HTML
1114
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
1115
+ Disclaimer::Segment Exists (0.4ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" IS NULL AND "disclaimer_segments"."id" = 1 LIMIT 1
1116
+ Disclaimer::Segment Exists (0.3ms) SELECT DISTINCT 1 AS one FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" IS NULL AND "disclaimer_segments"."id" = 2 LIMIT 1
1117
+ Completed 200 OK in 38ms (Views: 36.7ms | ActiveRecord: 0.9ms)
1118
+  (0.1ms) rollback transaction
1119
+  (0.1ms) begin transaction
1120
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1121
+ Processing by Disclaimer::DocumentsController#show as HTML
1122
+ Parameters: {"id"=>"one"}
1123
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1124
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1125
+ Completed 200 OK in 25ms (Views: 22.8ms | ActiveRecord: 0.4ms)
1126
+  (0.1ms) rollback transaction
1127
+  (0.1ms) begin transaction
1128
+ Disclaimer::Document Load (5.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1129
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_documents" 
1130
+ Processing by Disclaimer::DocumentsController#update as HTML
1131
+ Parameters: {"id"=>"one", "document"=>{"title"=>"Document update"}}
1132
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1133
+  (1.1ms) SAVEPOINT active_record_1
1134
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1135
+ SQL (0.5ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
1136
+  (0.3ms) UPDATE "disclaimer_documents" SET "title" = 'Document update', "updated_at" = '2013-06-07 10:14:20.924460' WHERE "disclaimer_documents"."id" = 1
1137
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1138
+ Redirected to http://test.host/disclaimer/documents/one
1139
+ Completed 302 Found in 23ms (ActiveRecord: 2.4ms)
1140
+  (0.2ms) SELECT COUNT(*) FROM "disclaimer_documents"
1141
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1142
+  (1.1ms) rollback transaction
1143
+  (0.2ms) begin transaction
1144
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1145
+ Disclaimer::Segment Load (0.5ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1146
+ Processing by Disclaimer::DocumentsController#update as HTML
1147
+ Parameters: {"id"=>"one", "document"=>{"segments"=>nil}}
1148
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1149
+  (0.1ms) SAVEPOINT active_record_1
1150
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1151
+ SQL (4.7ms) DELETE FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IN (1, 2)
1152
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1153
+ Redirected to http://test.host/disclaimer/documents/one
1154
+ Completed 302 Found in 17ms (ActiveRecord: 5.2ms)
1155
+ Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1156
+ Disclaimer::Segment Load (0.4ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1157
+  (0.9ms) rollback transaction
1158
+  (0.1ms) begin transaction
1159
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1160
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1161
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1162
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1163
+  (0.1ms) SAVEPOINT active_record_1
1164
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1165
+ SQL (0.8ms) INSERT INTO "disclaimer_segment_holders" ("created_at", "document_id", "position", "segment_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 07 Jun 2013 10:14:21 UTC +00:00], ["document_id", 1], ["position", 3], ["segment_id", 1], ["updated_at", Fri, 07 Jun 2013 10:14:21 UTC +00:00]]
1166
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1167
+  (0.8ms) rollback transaction
1168
+  (0.1ms) begin transaction
1169
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1170
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1171
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1172
+  (0.1ms) SAVEPOINT active_record_1
1173
+  (0.6ms) UPDATE "disclaimer_segments" SET "name" = 'this_is_a_name', "updated_at" = '2013-06-07 10:14:21.059424' WHERE "disclaimer_segments"."id" = 1
1174
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1175
+  (0.9ms) rollback transaction
1176
+  (0.1ms) begin transaction
1177
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1178
+ Disclaimer::Segment Load (3.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1179
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1180
+ Disclaimer::SegmentHolder Load (0.3ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
1181
+ Disclaimer::SegmentHolder Load (0.1ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."segment_id" = 2 ORDER BY position LIMIT 1
1182
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1183
+ Disclaimer::Segment Load (0.2ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1184
+  (0.1ms) rollback transaction
1185
+  (0.1ms) begin transaction
1186
+ Disclaimer::Document Load (6.7ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1187
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1188
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1189
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position LIMIT 1
1190
+  (0.1ms) SAVEPOINT active_record_1
1191
+ SQL (0.5ms) UPDATE "disclaimer_segment_holders" SET position = (position - 1) WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position > 1)
1192
+ Disclaimer::SegmentHolder Load (0.4ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND id != 980190962) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1193
+  (7.3ms) UPDATE "disclaimer_segment_holders" SET "position" = 2, "updated_at" = '2013-06-07 10:14:21.123322' WHERE "disclaimer_segment_holders"."id" = 980190962
1194
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position = 2)
1195
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1196
+ Disclaimer::Segment Load (11.0ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1197
+  (0.8ms) rollback transaction
1198
+  (0.3ms) begin transaction
1199
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1200
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1201
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1202
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 AND "disclaimer_segment_holders"."segment_id" IS NULL ORDER BY position LIMIT 1
1203
+  (0.1ms) rollback transaction
1204
+  (0.1ms) begin transaction
1205
+ Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1206
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1207
+ Disclaimer::Segment Load (0.7ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1208
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT DISTINCT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position LIMIT 1
1209
+  (0.1ms) SAVEPOINT active_record_1
1210
+ SQL (2.8ms) UPDATE "disclaimer_segment_holders" SET position = (position - 1) WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position > 1)
1211
+ Disclaimer::SegmentHolder Load (0.2ms) SELECT "disclaimer_segment_holders".* FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND id != 980190962) ORDER BY disclaimer_segment_holders.position DESC LIMIT 1
1212
+  (0.5ms) UPDATE "disclaimer_segment_holders" SET "position" = 2, "updated_at" = '2013-06-07 10:14:21.175636' WHERE "disclaimer_segment_holders"."id" = 980190962
1213
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segment_holders" WHERE ("disclaimer_segment_holders"."document_id" = 1 AND position = 2)
1214
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1215
+ Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
1216
+  (2.2ms) rollback transaction
1217
+  (0.1ms) begin transaction
1218
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1219
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1220
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1221
+  (0.1ms) rollback transaction
1222
+  (0.1ms) begin transaction
1223
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."id" = ? LIMIT 1 [["id", 1]]
1224
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1225
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 2]]
1226
+  (0.1ms) rollback transaction
1227
+  (0.1ms) begin transaction
1228
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1229
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
1230
+ Processing by Disclaimer::SegmentsController#create as HTML
1231
+ Parameters: {"segment"=>{"title"=>"Create segment", "name"=>"new segment"}}
1232
+  (0.1ms) SAVEPOINT active_record_1
1233
+ SQL (5.7ms) INSERT INTO "disclaimer_segments" ("body", "created_at", "name", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Fri, 07 Jun 2013 10:14:21 UTC +00:00], ["name", "new_segment"], ["title", "Create segment"], ["updated_at", Fri, 07 Jun 2013 10:14:21 UTC +00:00]]
1234
+  (1.8ms) RELEASE SAVEPOINT active_record_1
1235
+ Redirected to http://test.host/disclaimer/segments/new_segment
1236
+ Completed 302 Found in 23ms (ActiveRecord: 7.5ms)
1237
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
1238
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" ORDER BY "disclaimer_segments"."id" DESC LIMIT 1
1239
+  (3.1ms) rollback transaction
1240
+  (0.1ms) begin transaction
1241
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1242
+ Processing by Disclaimer::SegmentsController#delete as HTML
1243
+ Parameters: {"id"=>"one"}
1244
+ Disclaimer::Segment Load (11.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
1245
+ Completed 200 OK in 37ms (Views: 24.0ms | ActiveRecord: 11.3ms)
1246
+  (0.1ms) rollback transaction
1247
+  (0.1ms) begin transaction
1248
+ Disclaimer::Segment Load (3.5ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1249
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments"
1250
+ Processing by Disclaimer::SegmentsController#destroy as HTML
1251
+ Parameters: {"id"=>"one"}
1252
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
1253
+  (0.1ms) SAVEPOINT active_record_1
1254
+ SQL (0.5ms) DELETE FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? [["id", 1]]
1255
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1256
+ Redirected to http://test.host/disclaimer/segments
1257
+ Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
1258
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
1259
+  (0.6ms) rollback transaction
1260
+  (0.1ms) begin transaction
1261
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1262
+ Processing by Disclaimer::SegmentsController#edit as HTML
1263
+ Parameters: {"id"=>"one"}
1264
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
1265
+ Completed 200 OK in 40ms (Views: 27.9ms | ActiveRecord: 0.4ms)
1266
+  (0.1ms) rollback transaction
1267
+  (0.1ms) begin transaction
1268
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1269
+ Processing by Disclaimer::SegmentsController#index as HTML
1270
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" 
1271
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_documents"."id" = "disclaimer_segment_holders"."document_id" WHERE "disclaimer_segment_holders"."segment_id" = 1 ORDER BY position
1272
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_documents"."id" = "disclaimer_segment_holders"."document_id" WHERE "disclaimer_segment_holders"."segment_id" = 2 ORDER BY position
1273
+ Completed 200 OK in 54ms (Views: 51.6ms | ActiveRecord: 1.0ms)
1274
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments"
1275
+  (0.2ms) rollback transaction
1276
+  (0.3ms) begin transaction
1277
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1278
+ Processing by Disclaimer::SegmentsController#new as HTML
1279
+ Completed 200 OK in 22ms (Views: 14.5ms | ActiveRecord: 0.0ms)
1280
+  (0.2ms) rollback transaction
1281
+  (0.3ms) begin transaction
1282
+ Disclaimer::Segment Load (0.4ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1283
+ Processing by Disclaimer::SegmentsController#show as HTML
1284
+ Parameters: {"id"=>"one"}
1285
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
1286
+ Rendered /home/rob/web/disclaimer/app/views/disclaimer/segments/_segment.html.erb (0.7ms)
1287
+ Completed 200 OK in 127ms (Views: 117.1ms | ActiveRecord: 0.2ms)
1288
+  (0.2ms) rollback transaction
1289
+  (0.1ms) begin transaction
1290
+ Disclaimer::Segment Load (0.3ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1291
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments" 
1292
+ Processing by Disclaimer::SegmentsController#update as HTML
1293
+ Parameters: {"id"=>"one", "segment"=>{"title"=>"Segment update"}}
1294
+ Disclaimer::Segment Load (0.2ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."name" = 'one' LIMIT 1
1295
+  (0.1ms) SAVEPOINT active_record_1
1296
+  (0.5ms) UPDATE "disclaimer_segments" SET "title" = 'Segment update', "updated_at" = '2013-06-07 10:14:21.722225' WHERE "disclaimer_segments"."id" = 1
1297
+  (3.4ms) RELEASE SAVEPOINT active_record_1
1298
+ Redirected to http://test.host/disclaimer/segments/one
1299
+ Completed 302 Found in 9ms (ActiveRecord: 4.1ms)
1300
+  (0.1ms) SELECT COUNT(*) FROM "disclaimer_segments"
1301
+ Disclaimer::Segment Load (0.1ms) SELECT "disclaimer_segments".* FROM "disclaimer_segments" WHERE "disclaimer_segments"."id" = ? LIMIT 1 [["id", 1]]
1302
+  (0.8ms) rollback transaction
1303
+  (0.1ms) begin transaction
1304
+  (0.1ms) rollback transaction
1305
+  (0.1ms) begin transaction
1306
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
1307
+ Processing by SampleController#bypass_disclaimer as HTML
1308
+ Completed 200 OK in 21ms (Views: 20.2ms | ActiveRecord: 0.0ms)
1309
+  (0.1ms) rollback transaction
1310
+  (0.1ms) begin transaction
1311
+ Disclaimer::Document Load (3.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
1312
+  (0.1ms) SAVEPOINT active_record_1
1313
+  (0.6ms) UPDATE "disclaimer_documents" SET "name" = 'something_else', "updated_at" = '2013-06-07 10:14:21.817487' WHERE "disclaimer_documents"."id" = 1
1314
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1315
+ Processing by SampleController#index as HTML
1316
+ Disclaimer::Document Exists (0.2ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1317
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'one'
1318
+ Completed 200 OK in 8ms (Views: 1.5ms | ActiveRecord: 0.2ms)
1319
+  (8.6ms) rollback transaction
1320
+  (0.1ms) begin transaction
1321
+ Disclaimer::Document Load (0.5ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
1322
+  (0.1ms) SAVEPOINT active_record_1
1323
+  (0.5ms) UPDATE "disclaimer_documents" SET "name" = 'something_else', "updated_at" = '2013-06-07 10:14:21.855956' WHERE "disclaimer_documents"."id" = 1
1324
+  (0.4ms) RELEASE SAVEPOINT active_record_1
1325
+ Processing by SampleController#index as HTML
1326
+ Disclaimer::Document Exists (0.1ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1327
+ No disclaimer displayed as unable to find Disclaimer::Document with name 'one'
1328
+ Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.1ms)
1329
+  (0.1ms) SAVEPOINT active_record_1
1330
+  (0.4ms) UPDATE "disclaimer_documents" SET "name" = 'one', "updated_at" = '2013-06-07 10:14:21.890344' WHERE "disclaimer_documents"."id" = 1
1331
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1332
+ Processing by SampleController#index as HTML
1333
+ Disclaimer::Document Exists (0.1ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1334
+ Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1335
+ Redirected to http://test.host/disclaimer/documents/one
1336
+ Filter chain halted as #<Proc:0x8fe8b90@/home/rob/web/disclaimer/lib/rails/actionpack/lib/action_controller/base.rb:7> rendered or redirected
1337
+ Completed 302 Found in 15ms (Views: 8.1ms | ActiveRecord: 0.4ms)
1338
+  (0.7ms) rollback transaction
1339
+  (0.1ms) begin transaction
1340
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
1341
+ Processing by SampleController#index as HTML
1342
+ Disclaimer::Document Exists (0.2ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1343
+ Disclaimer::Document Load (9.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1344
+ Redirected to http://test.host/disclaimer/documents/one
1345
+ Filter chain halted as #<Proc:0x8fe8b90@/home/rob/web/disclaimer/lib/rails/actionpack/lib/action_controller/base.rb:7> rendered or redirected
1346
+ Completed 302 Found in 14ms (ActiveRecord: 9.3ms)
1347
+  (0.1ms) rollback transaction
1348
+  (0.1ms) begin transaction
1349
+ Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
1350
+ Processing by SampleController#index as HTML
1351
+ Disclaimer::Document Exists (0.1ms) SELECT 1 AS one FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'one' LIMIT 1
1352
+ Completed 200 OK in 9ms (Views: 1.5ms | ActiveRecord: 0.1ms)
1353
+  (0.1ms) rollback transaction