acts_as_assets 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@ class ActsAsAssets::AssetsController < ApplicationController
56
56
  begin
57
57
  @asset = klazz.find(params[:asset_id])
58
58
 
59
- send_file(file_to_download_path, {:filename => @asset.asset.to_file.original_filename, :content_type => @asset.asset_content_type, :disposition => 'inline'})
59
+ send_file(file_to_download_path, {:filename => File.basename(@asset.asset.path), :content_type => @asset.asset_content_type, :disposition => 'inline'})
60
60
 
61
61
  rescue ActiveRecord::RecordNotFound
62
62
  respond_with_404
@@ -40,7 +40,7 @@ module ActsAsAssets::AssetsHelper
40
40
  end
41
41
 
42
42
  def asset_file_name(asset)
43
- asset.asset.to_file.original_filename
43
+ File.basename(asset.asset.path)
44
44
  end
45
45
  def asset_file_path(asset)
46
46
  asset.asset.url
@@ -1,12 +1,12 @@
1
1
  <% if asset.displayable? %>
2
2
  <li>
3
3
  <%= link_to("#{asset.asset.url(:original)}&type=#{URI.encode(@type)}", :class => "zoom", :rel => "immagine_sito") {image_tag("#{asset.asset.url(:thumb)}&type=#{URI.encode(@type)}", :alt => 'Apri Immagine')}%>
4
- <div><%= asset.asset.to_file.original_filename %></div>
4
+ <div><%= File.basename(asset.asset.path) %></div>
5
5
  <%= destroy_link(asset, model) %>
6
6
  </li>
7
7
  <% else %>
8
8
  <li>
9
- <%= link_to(asset.asset.to_file.original_filename, "#{asset.asset.url}&type=#{@type}") %>
9
+ <%= link_to(File.basename(asset.asset.path), "#{asset.asset.url}&type=#{@type}") %>
10
10
  <%= destroy_link(asset, model) %>
11
11
  </li>
12
12
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module ActsAsAssets
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -104,7 +104,7 @@ describe "ActsAsAssets" do
104
104
  end
105
105
  it "should interpolate the correct url for a subclass instance" do
106
106
  doc = Books::Assets::TestDoc.create! :asset => uploaded_test_asset, :book => book
107
- doc.asset.url.should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/#{doc.asset.to_file.original_filename}/
107
+ doc.asset.url.should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/#{File.basename(doc.asset.path)}/
108
108
  end
109
109
  it "should interpolate the correct path for a subclass instance" do
110
110
  chapter = Chapters::Assets::Paragraph.create!(:chapter => chap, :asset => uploaded_test_asset)
@@ -139,9 +139,9 @@ describe "ActsAsAssets" do
139
139
  end
140
140
  it "should have style param in the url" do
141
141
  doc = Books::Assets::TestImage.create! :asset => uploaded_test_asset, :book => book
142
- doc.asset.url(:thumb).should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/thumb\/#{doc.asset.to_file.original_filename}/
143
- doc.asset.url(:medium).should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/medium\/#{doc.asset.to_file.original_filename}/
144
- doc.asset.url(:original).should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/original\/#{doc.asset.to_file.original_filename}/
142
+ doc.asset.url(:thumb).should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/thumb\/#{File.basename(doc.asset.path)}/
143
+ doc.asset.url(:medium).should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/medium\/#{File.basename(doc.asset.path)}/
144
+ doc.asset.url(:original).should match /\/books\/#{book.id}\/assets\/get\/#{doc.id}\/original\/#{File.basename(doc.asset.path)}/
145
145
  end
146
146
 
147
147
  end
@@ -41,7 +41,7 @@ describe Books::AssetsController do
41
41
 
42
42
  it "should return the correct formatted view" do
43
43
  pending "TODO port the tag "
44
- response.body.should match(/#{@asset.asset.to_file.original_filename}/)
44
+ response.body.should match(/#{File.basename(@asset.asset.path)}/)
45
45
  end
46
46
 
47
47
  end
@@ -125,7 +125,7 @@ describe Books::AssetsController do
125
125
  it "should stream the asset" do
126
126
  should respond_with(:success)
127
127
  should respond_with_content_type("image/jpeg")
128
- response.headers.to_s.should match /#{assigns(:asset).asset.to_file.original_filename}/
128
+ response.headers.to_s.should match /#{File.basename(assigns(:asset).asset.path)}/
129
129
  end
130
130
 
131
131
  end
@@ -0,0 +1,1365 @@
1
+  (0.2ms) select sqlite_version(*)
2
+  (2.3ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255))
3
+  (2.2ms) CREATE TABLE "books_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_file_name" varchar(255), "asset_content_type" varchar(255), "asset_file_size" integer, "asset_updated_at" datetime, "type" varchar(255), "counter" integer DEFAULT 0 NOT NULL, "book_id" integer, "displayable" boolean DEFAULT 'f' NOT NULL) 
4
+  (1.9ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL)
5
+  (1.9ms) CREATE TABLE "chapters_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_file_name" varchar(255), "asset_content_type" varchar(255), "asset_file_size" integer, "asset_updated_at" datetime, "type" varchar(255), "counter" integer DEFAULT 0 NOT NULL, "chapter_name" varchar(255), "displayable" boolean DEFAULT 'f' NOT NULL) 
6
+  (2.3ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL)
7
+  (2.6ms) CREATE TABLE "rt_tipi_pannello_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_file_name" varchar(255), "asset_content_type" varchar(255), "asset_file_size" integer, "asset_updated_at" datetime, "type" varchar(255), "counter" integer DEFAULT 0 NOT NULL, "displayable" boolean DEFAULT 'f' NOT NULL, "tipo_pannello_name" varchar(255)) 
8
+ SQL (2.4ms) DELETE FROM "books_assets"
9
+ SQL (1.6ms) DELETE FROM "books_assets"
10
+ SQL (1.9ms) DELETE FROM "books"
11
+ SQL (2.3ms) DELETE FROM "books_assets"
12
+ SQL (1.8ms) DELETE FROM "books_assets"
13
+ SQL (1.6ms) DELETE FROM "books"
14
+ SQL (2.4ms) DELETE FROM "books_assets"
15
+ SQL (1.8ms) DELETE FROM "books_assets"
16
+ SQL (1.6ms) DELETE FROM "books"
17
+ SQL (2.0ms) DELETE FROM "books_assets"
18
+ SQL (1.7ms) DELETE FROM "books_assets"
19
+ SQL (5.0ms) DELETE FROM "books"
20
+ SQL (2.1ms) DELETE FROM "books_assets"
21
+ SQL (1.9ms) DELETE FROM "books_assets"
22
+ SQL (2.2ms) DELETE FROM "books"
23
+ SQL (1.7ms) DELETE FROM "books_assets"
24
+ SQL (3.3ms) DELETE FROM "books_assets"
25
+ SQL (2.1ms) DELETE FROM "books"
26
+ SQL (2.2ms) DELETE FROM "books_assets"
27
+ SQL (1.5ms) DELETE FROM "books_assets"
28
+ SQL (1.4ms) DELETE FROM "books"
29
+ SQL (2.3ms) DELETE FROM "books_assets"
30
+ SQL (2.7ms) DELETE FROM "books_assets"
31
+ SQL (1.4ms) DELETE FROM "books"
32
+ SQL (1.7ms) DELETE FROM "books_assets"
33
+ SQL (1.8ms) DELETE FROM "books_assets"
34
+ SQL (1.7ms) DELETE FROM "books"
35
+ SQL (2.3ms) DELETE FROM "books_assets"
36
+ SQL (1.6ms) DELETE FROM "books_assets"
37
+ SQL (1.5ms) DELETE FROM "books"
38
+  (0.1ms) begin transaction
39
+ SQL (0.6ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
40
+  (1.9ms) commit transaction
41
+  (0.1ms) begin transaction
42
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 1
43
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 1], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
44
+ [paperclip] Saving attachments.
45
+  (2.0ms) commit transaction
46
+ SQL (1.7ms) DELETE FROM "books_assets"
47
+ SQL (1.8ms) DELETE FROM "books_assets"
48
+ SQL (1.7ms) DELETE FROM "books"
49
+  (0.1ms) begin transaction
50
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
51
+  (1.8ms) commit transaction
52
+  (0.0ms) begin transaction
53
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 2
54
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 2], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
55
+ [paperclip] Saving attachments.
56
+  (1.9ms) commit transaction
57
+ SQL (2.6ms) DELETE FROM "books_assets"
58
+ SQL (1.9ms) DELETE FROM "books_assets"
59
+ SQL (1.4ms) DELETE FROM "books"
60
+  (0.1ms) begin transaction
61
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
62
+  (1.3ms) commit transaction
63
+  (0.0ms) begin transaction
64
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 3
65
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 3], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
66
+ [paperclip] Saving attachments.
67
+  (1.8ms) commit transaction
68
+ SQL (1.7ms) DELETE FROM "books_assets"
69
+ SQL (1.6ms) DELETE FROM "books_assets"
70
+ SQL (3.9ms) DELETE FROM "books"
71
+  (0.1ms) begin transaction
72
+ SQL (0.4ms) INSERT INTO "rt_tipi_pannello" ("name") VALUES (?) [["name", "Suntech STP"]]
73
+  (1.4ms) commit transaction
74
+  (0.1ms) begin transaction
75
+ TipiPannello::Documenti::SchedaTecnica Load (0.2ms) SELECT "rt_tipi_pannello_assets".* FROM "rt_tipi_pannello_assets" WHERE "rt_tipi_pannello_assets"."type" IN ('TipiPannello::Documenti::SchedaTecnica') AND "rt_tipi_pannello_assets"."tipo_pannello_name" = 'Suntech STP' LIMIT 1
76
+  (0.2ms) SELECT MAX("rt_tipi_pannello_assets"."counter") AS max_id FROM "rt_tipi_pannello_assets" WHERE "rt_tipi_pannello_assets"."type" IN ('TipiPannello::Documenti::SchedaTecnica') AND "rt_tipi_pannello_assets"."tipo_pannello_name" = 'Suntech STP'
77
+ SQL (36.0ms) INSERT INTO "rt_tipi_pannello_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "counter", "displayable", "tipo_pannello_name", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:42 UTC +00:00], ["counter", 1], ["displayable", false], ["tipo_pannello_name", "Suntech STP"], ["type", "TipiPannello::Documenti::SchedaTecnica"]]
78
+ [paperclip] Saving attachments.
79
+ [paperclip] saving public/system/tipi_pannello/Suntech STP/documenti/scheda_tecnica.jpg
80
+  (2.5ms) commit transaction
81
+ SQL (1.7ms) DELETE FROM "books_assets"
82
+ SQL (1.9ms) DELETE FROM "books_assets"
83
+ SQL (1.4ms) DELETE FROM "books"
84
+  (0.1ms) begin transaction
85
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
86
+  (1.2ms) commit transaction
87
+  (0.0ms) begin transaction
88
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 4
89
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 4], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
90
+ [paperclip] Saving attachments.
91
+  (1.8ms) commit transaction
92
+ SQL (2.3ms) DELETE FROM "books_assets"
93
+ SQL (1.8ms) DELETE FROM "books_assets"
94
+ SQL (3.1ms) DELETE FROM "books"
95
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" IS NULL
96
+ SQL (2.1ms) DELETE FROM "books_assets"
97
+ SQL (1.7ms) DELETE FROM "books_assets"
98
+ SQL (7.5ms) DELETE FROM "books"
99
+  (0.1ms) begin transaction
100
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" IS NULL
101
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", nil], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
102
+ [paperclip] Saving attachments.
103
+  (1.7ms) commit transaction
104
+  (0.1ms) begin transaction
105
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" IS NULL
106
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", nil], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
107
+ [paperclip] Saving attachments.
108
+  (1.7ms) commit transaction
109
+ Books::Asset Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 5]]
110
+ Books::Asset Load (0.1ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 6]]
111
+ SQL (1.8ms) DELETE FROM "books_assets"
112
+ SQL (1.5ms) DELETE FROM "books_assets"
113
+ SQL (1.4ms) DELETE FROM "books"
114
+  (0.1ms) begin transaction
115
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
116
+  (9.0ms) commit transaction
117
+  (0.1ms) begin transaction
118
+  (0.5ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 5
119
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:42 UTC +00:00], ["book_id", 5], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
120
+ [paperclip] Saving attachments.
121
+ [paperclip] saving public/system/books/5/assets/test_doc.jpg
122
+  (2.3ms) commit transaction
123
+ SQL (1.7ms) DELETE FROM "books_assets"
124
+ SQL (1.7ms) DELETE FROM "books_assets"
125
+ SQL (1.6ms) DELETE FROM "books"
126
+  (0.1ms) begin transaction
127
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
128
+  (3.8ms) commit transaction
129
+  (0.1ms) begin transaction
130
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 6
131
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:42 UTC +00:00], ["book_id", 6], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
132
+ [paperclip] Saving attachments.
133
+ [paperclip] saving public/system/books/6/assets/test_doc.jpg
134
+  (1.6ms) commit transaction
135
+ SQL (3.3ms) DELETE FROM "books_assets"
136
+ SQL (1.9ms) DELETE FROM "books_assets"
137
+ SQL (2.2ms) DELETE FROM "books"
138
+  (0.1ms) begin transaction
139
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
140
+  (1.7ms) commit transaction
141
+  (0.1ms) begin transaction
142
+  (0.3ms) SELECT MAX("chapters_assets"."counter") AS max_id FROM "chapters_assets" WHERE "chapters_assets"."type" IN ('Chapters::Assets::Paragraph') AND "chapters_assets"."chapter_name" = 'a new chapter'
143
+ SQL (0.5ms) INSERT INTO "chapters_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "chapter_name", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:42 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 1], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
144
+ [paperclip] Saving attachments.
145
+ [paperclip] saving public/system/chapters/a new chapter/assets/paragraph.jpg
146
+  (4.5ms) commit transaction
147
+ SQL (2.0ms) DELETE FROM "books_assets"
148
+ SQL (1.8ms) DELETE FROM "books_assets"
149
+ SQL (1.8ms) DELETE FROM "books"
150
+  (0.1ms) begin transaction
151
+ SQL (0.3ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
152
+  (1.5ms) commit transaction
153
+  (0.1ms) begin transaction
154
+  (0.5ms) SELECT MAX("chapters_assets"."counter") AS max_id FROM "chapters_assets" WHERE "chapters_assets"."type" IN ('Chapters::Assets::Paragraph') AND "chapters_assets"."chapter_name" = 'a new chapter'
155
+ SQL (0.5ms) INSERT INTO "chapters_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "chapter_name", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:42 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 2], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
156
+ [paperclip] Saving attachments.
157
+ [paperclip] saving public/system/chapters/a new chapter/assets/paragraph_2.jpg
158
+  (1.5ms) commit transaction
159
+ SQL (1.8ms) DELETE FROM "books_assets"
160
+ SQL (1.7ms) DELETE FROM "books_assets"
161
+ SQL (1.5ms) DELETE FROM "books"
162
+ SQL (3.1ms) DELETE FROM "books_assets"
163
+ SQL (2.2ms) DELETE FROM "books_assets"
164
+ SQL (1.6ms) DELETE FROM "books"
165
+ SQL (3.5ms) DELETE FROM "books_assets"
166
+ SQL (6.3ms) DELETE FROM "books_assets"
167
+ SQL (1.5ms) DELETE FROM "books"
168
+  (0.1ms) begin transaction
169
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
170
+  (1.6ms) commit transaction
171
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk.jpg[0]'
172
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x'
173
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x[0]'
174
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x20120424-55344-1s7ircx'
175
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x[0]'
176
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-toh8lk20120424-55344-19oel1x20120424-55344-axt5aq'
177
+  (0.2ms) begin transaction
178
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 7
179
+ SQL (0.9ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:12:42 UTC +00:00], ["book_id", 7], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
180
+ [paperclip] Saving attachments.
181
+ [paperclip] saving public/system/books/7/assets/original/test_image.jpg
182
+ [paperclip] saving public/system/books/7/assets/thumb/test_image.jpg
183
+ [paperclip] saving public/system/books/7/assets/medium/test_image.jpg
184
+  (1.9ms) commit transaction
185
+ SQL (7.1ms) DELETE FROM "books_assets"
186
+ SQL (1.6ms) DELETE FROM "books_assets"
187
+ SQL (1.4ms) DELETE FROM "books"
188
+  (0.1ms) begin transaction
189
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
190
+  (1.6ms) commit transaction
191
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il.jpg[0]'
192
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be'
193
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be[0]'
194
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be20120424-55344-uycqos'
195
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be[0]'
196
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-cbh4il20120424-55344-11j63be20120424-55344-ugu7ro'
197
+  (0.2ms) begin transaction
198
+  (0.5ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 8
199
+ SQL (0.7ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:12:43 UTC +00:00], ["book_id", 8], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
200
+ [paperclip] Saving attachments.
201
+ [paperclip] saving public/system/books/8/assets/original/test_image.jpg
202
+ [paperclip] saving public/system/books/8/assets/thumb/test_image.jpg
203
+ [paperclip] saving public/system/books/8/assets/medium/test_image.jpg
204
+  (2.1ms) commit transaction
205
+ SQL (3.2ms) DELETE FROM "books_assets"
206
+ SQL (5.3ms) DELETE FROM "books_assets"
207
+ SQL (1.8ms) DELETE FROM "books"
208
+ SQL (2.1ms) DELETE FROM "books_assets"
209
+ SQL (1.8ms) DELETE FROM "books_assets"
210
+ SQL (4.7ms) DELETE FROM "books"
211
+ SQL (1.7ms) DELETE FROM "books_assets"
212
+ SQL (1.7ms) DELETE FROM "books_assets"
213
+ SQL (1.4ms) DELETE FROM "books"
214
+ SQL (10.5ms) DELETE FROM "books_assets"
215
+ SQL (1.8ms) DELETE FROM "books_assets"
216
+ SQL (1.5ms) DELETE FROM "books"
217
+ SQL (3.9ms) DELETE FROM "books_assets"
218
+ SQL (2.0ms) DELETE FROM "books_assets"
219
+ SQL (1.7ms) DELETE FROM "books"
220
+  (0.1ms) begin transaction
221
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
222
+  (2.0ms) commit transaction
223
+  (0.1ms) begin transaction
224
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 9
225
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:43 UTC +00:00], ["book_id", 9], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
226
+ [paperclip] Saving attachments.
227
+ [paperclip] saving public/system/books/9/assets/test_doc.jpg
228
+  (2.6ms) commit transaction
229
+ Processing by Books::AssetsController#index as HTML
230
+ Parameters: {"multiple"=>true, "book_id"=>"9", "type"=>"Assets/TestDoc"}
231
+ Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "9"]]
232
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (82.8ms)
233
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '9'
234
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (6.2ms)
235
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (7.7ms)
236
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (95.4ms)
237
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/index.html.erb (189.5ms)
238
+ Completed 200 OK in 230ms (Views: 226.0ms | ActiveRecord: 0.6ms)
239
+ SQL (3.0ms) DELETE FROM "books_assets"
240
+ SQL (2.1ms) DELETE FROM "books_assets"
241
+ SQL (1.5ms) DELETE FROM "books"
242
+  (0.1ms) begin transaction
243
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
244
+  (1.9ms) commit transaction
245
+  (0.1ms) begin transaction
246
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 10
247
+ SQL (1.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 10], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
248
+ [paperclip] Saving attachments.
249
+ [paperclip] saving public/system/books/10/assets/test_doc.jpg
250
+  (2.4ms) commit transaction
251
+ Processing by Books::AssetsController#index as HTML
252
+ Parameters: {"target"=>"target_div", "book_id"=>"10", "type"=>"Assets/TestDoc"}
253
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "10"]]
254
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (3.6ms)
255
+ Books::Assets::TestDoc Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '10'
256
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (3.5ms)
257
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (3.9ms)
258
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (9.2ms)
259
+ Completed 200 OK in 13ms (Views: 9.6ms | ActiveRecord: 0.5ms)
260
+ SQL (2.6ms) DELETE FROM "books_assets"
261
+ SQL (1.8ms) DELETE FROM "books_assets"
262
+ SQL (1.7ms) DELETE FROM "books"
263
+  (0.1ms) begin transaction
264
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
265
+  (1.4ms) commit transaction
266
+  (0.1ms) begin transaction
267
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 11
268
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 11], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
269
+ [paperclip] Saving attachments.
270
+ [paperclip] saving public/system/books/11/assets/test_doc.jpg
271
+  (6.0ms) commit transaction
272
+ Processing by Books::AssetsController#index as HTML
273
+ Parameters: {"target"=>"target_div", "book_id"=>"11", "type"=>"Assets/TestDoc"}
274
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "11"]]
275
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (2.9ms)
276
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '11'
277
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (3.5ms)
278
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (4.0ms)
279
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (9.2ms)
280
+ Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.5ms)
281
+ SQL (2.5ms) DELETE FROM "books_assets"
282
+ SQL (1.7ms) DELETE FROM "books_assets"
283
+ SQL (1.5ms) DELETE FROM "books"
284
+  (0.1ms) begin transaction
285
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
286
+  (1.4ms) commit transaction
287
+  (0.1ms) begin transaction
288
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 12
289
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 12], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
290
+ [paperclip] Saving attachments.
291
+ [paperclip] saving public/system/books/12/assets/test_doc.jpg
292
+  (2.8ms) commit transaction
293
+ Processing by Books::AssetsController#index as HTML
294
+ Parameters: {"target"=>"target_div", "book_id"=>"12", "type"=>"Assets/TestDoc"}
295
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "12"]]
296
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.3ms)
297
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '12'
298
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (5.3ms)
299
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (6.0ms)
300
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (15.1ms)
301
+ Completed 200 OK in 18ms (Views: 15.6ms | ActiveRecord: 0.5ms)
302
+ SQL (2.1ms) DELETE FROM "books_assets"
303
+ SQL (8.6ms) DELETE FROM "books_assets"
304
+ SQL (1.6ms) DELETE FROM "books"
305
+  (0.1ms) begin transaction
306
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
307
+  (1.3ms) commit transaction
308
+  (0.1ms) begin transaction
309
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 13
310
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 13], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
311
+ [paperclip] Saving attachments.
312
+ [paperclip] saving public/system/books/13/assets/test_doc.jpg
313
+  (1.6ms) commit transaction
314
+ Processing by Books::AssetsController#index as HTML
315
+ Parameters: {"target"=>"target_div", "book_id"=>"13", "type"=>"Assets/TestDoc"}
316
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "13"]]
317
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (2.3ms)
318
+ Books::Assets::TestDoc Load (1.5ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '13'
319
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.3ms)
320
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (3.1ms)
321
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (8.5ms)
322
+ Completed 200 OK in 11ms (Views: 7.7ms | ActiveRecord: 1.7ms)
323
+ SQL (2.5ms) DELETE FROM "books_assets"
324
+ SQL (2.4ms) DELETE FROM "books_assets"
325
+ SQL (2.1ms) DELETE FROM "books"
326
+  (0.1ms) begin transaction
327
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
328
+  (4.2ms) commit transaction
329
+  (0.1ms) begin transaction
330
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 14
331
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 14], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
332
+ [paperclip] Saving attachments.
333
+ [paperclip] saving public/system/books/14/assets/test_doc.jpg
334
+  (2.4ms) commit transaction
335
+ Processing by Books::AssetsController#index as JSON
336
+ Parameters: {"target"=>"target_div", "book_id"=>"14", "type"=>"Assets/TestDoc"}
337
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "14"]]
338
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '14'
339
+ Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.4ms)
340
+ SQL (3.9ms) DELETE FROM "books_assets"
341
+ SQL (2.4ms) DELETE FROM "books_assets"
342
+ SQL (1.6ms) DELETE FROM "books"
343
+  (0.1ms) begin transaction
344
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
345
+  (1.4ms) commit transaction
346
+  (0.1ms) begin transaction
347
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 15
348
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 15], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
349
+ [paperclip] Saving attachments.
350
+ [paperclip] saving public/system/books/15/assets/test_doc.jpg
351
+  (2.0ms) commit transaction
352
+ Processing by Books::AssetsController#index as JSON
353
+ Parameters: {"target"=>"target_div", "book_id"=>"15", "type"=>"Assets/TestDoc"}
354
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "15"]]
355
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '15'
356
+ Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.5ms)
357
+ SQL (4.6ms) DELETE FROM "books_assets"
358
+ SQL (1.8ms) DELETE FROM "books_assets"
359
+ SQL (1.8ms) DELETE FROM "books"
360
+  (0.1ms) begin transaction
361
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
362
+  (1.5ms) commit transaction
363
+ Processing by Books::AssetsController#create as JS
364
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fbb7da2ffb8 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-55344-rw7ti6>>, "book_id"=>"16", "type"=>"Assets/TestDoc"}
365
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "16"]]
366
+  (0.1ms) begin transaction
367
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 16
368
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 16], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
369
+ [paperclip] Saving attachments.
370
+ [paperclip] saving public/system/books/16/assets/test_doc.jpg
371
+  (3.0ms) commit transaction
372
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '16'
373
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (2.0ms)
374
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (3.5ms)
375
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (7.7ms)
376
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (12.4ms)
377
+ Completed 200 OK in 52ms (Views: 35.6ms | ActiveRecord: 4.4ms)
378
+ SQL (1.7ms) DELETE FROM "books_assets"
379
+ SQL (1.6ms) DELETE FROM "books_assets"
380
+ SQL (2.3ms) DELETE FROM "books"
381
+  (0.1ms) begin transaction
382
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
383
+  (1.5ms) commit transaction
384
+ Processing by Books::AssetsController#create as JS
385
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fbb7c1ad4e0 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-55344-1e39wp1>>, "book_id"=>"17", "type"=>"Assets/TestDoc"}
386
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "17"]]
387
+  (0.1ms) begin transaction
388
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 17
389
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 17], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
390
+ [paperclip] Saving attachments.
391
+ [paperclip] saving public/system/books/17/assets/test_doc.jpg
392
+  (5.9ms) commit transaction
393
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '17'
394
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (3.1ms)
395
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.3ms)
396
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.7ms)
397
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (6.3ms)
398
+ Completed 200 OK in 30ms (Views: 8.9ms | ActiveRecord: 7.3ms)
399
+ SQL (2.3ms) DELETE FROM "books_assets"
400
+ SQL (1.7ms) DELETE FROM "books_assets"
401
+ SQL (2.1ms) DELETE FROM "books"
402
+  (0.1ms) begin transaction
403
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
404
+  (2.3ms) commit transaction
405
+ Processing by Books::AssetsController#create as JS
406
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fbb7c2b7c50 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-55344-m64c4f>>, "book_id"=>"18", "type"=>"Assets/TestDoc"}
407
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "18"]]
408
+  (0.1ms) begin transaction
409
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 18
410
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 18], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
411
+ [paperclip] Saving attachments.
412
+ [paperclip] saving public/system/books/18/assets/test_doc.jpg
413
+  (1.9ms) commit transaction
414
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '18'
415
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.5ms)
416
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.1ms)
417
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.4ms)
418
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (4.5ms)
419
+ Completed 200 OK in 85ms (Views: 6.4ms | ActiveRecord: 3.3ms)
420
+ SQL (2.4ms) DELETE FROM "books_assets"
421
+ SQL (2.3ms) DELETE FROM "books_assets"
422
+ SQL (1.5ms) DELETE FROM "books"
423
+  (0.1ms) begin transaction
424
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
425
+  (1.6ms) commit transaction
426
+ Processing by Books::AssetsController#create as JS
427
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fbb7af2e8c8 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-55344-fgz51g>>, "book_id"=>"19", "type"=>"Assets/TestDoc"}
428
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "19"]]
429
+  (0.1ms) begin transaction
430
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 19
431
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 19], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
432
+ [paperclip] Saving attachments.
433
+ [paperclip] saving public/system/books/19/assets/test_doc.jpg
434
+  (1.4ms) commit transaction
435
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '19'
436
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (3.5ms)
437
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.2ms)
438
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.6ms)
439
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (6.6ms)
440
+ Completed 200 OK in 26ms (Views: 9.9ms | ActiveRecord: 2.7ms)
441
+ SQL (1.8ms) DELETE FROM "books_assets"
442
+ SQL (1.8ms) DELETE FROM "books_assets"
443
+ SQL (1.3ms) DELETE FROM "books"
444
+  (0.1ms) begin transaction
445
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
446
+  (1.3ms) commit transaction
447
+  (0.1ms) begin transaction
448
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 20
449
+ SQL (1.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 20], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
450
+ [paperclip] Saving attachments.
451
+ [paperclip] saving public/system/books/20/assets/test_doc.jpg
452
+  (1.6ms) commit transaction
453
+ Processing by Books::AssetsController#destroy as JS
454
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"20", "asset_id"=>"22"}
455
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "20"]]
456
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = '22' LIMIT 1
457
+  (0.1ms) begin transaction
458
+ [paperclip] Scheduling attachments for deletion.
459
+ SQL (0.6ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 22]]
460
+ [paperclip] Deleting attachments.
461
+ [paperclip] deleting public/system/books/20/assets/test_doc.jpg
462
+  (6.2ms) commit transaction
463
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '20'
464
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.8ms)
465
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
466
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
467
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.6ms)
468
+ Completed 200 OK in 25ms (Views: 8.5ms | ActiveRecord: 7.6ms)
469
+ SQL (3.6ms) DELETE FROM "books_assets"
470
+ SQL (1.8ms) DELETE FROM "books_assets"
471
+ SQL (1.7ms) DELETE FROM "books"
472
+  (0.1ms) begin transaction
473
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
474
+  (1.9ms) commit transaction
475
+  (0.1ms) begin transaction
476
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 21
477
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 21], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
478
+ [paperclip] Saving attachments.
479
+ [paperclip] saving public/system/books/21/assets/test_doc.jpg
480
+  (1.9ms) commit transaction
481
+ Processing by Books::AssetsController#destroy as JS
482
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"21", "asset_id"=>"23"}
483
+ Book Load (0.4ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "21"]]
484
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = '23' LIMIT 1
485
+  (0.1ms) begin transaction
486
+ [paperclip] Scheduling attachments for deletion.
487
+ SQL (0.6ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 23]]
488
+ [paperclip] Deleting attachments.
489
+ [paperclip] deleting public/system/books/21/assets/test_doc.jpg
490
+  (1.7ms) commit transaction
491
+ Books::Assets::TestDoc Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '21'
492
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.7ms)
493
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
494
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
495
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.5ms)
496
+ Completed 200 OK in 20ms (Views: 8.5ms | ActiveRecord: 3.5ms)
497
+ SQL (1.8ms) DELETE FROM "books_assets"
498
+ SQL (1.8ms) DELETE FROM "books_assets"
499
+ SQL (1.6ms) DELETE FROM "books"
500
+  (0.1ms) begin transaction
501
+ SQL (0.7ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
502
+  (3.9ms) commit transaction
503
+  (0.1ms) begin transaction
504
+  (1.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 22
505
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 22], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
506
+ [paperclip] Saving attachments.
507
+ [paperclip] saving public/system/books/22/assets/test_doc.jpg
508
+  (2.8ms) commit transaction
509
+ Processing by Books::AssetsController#destroy as JS
510
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"22", "asset_id"=>"24"}
511
+ Book Load (0.8ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "22"]]
512
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = '24' LIMIT 1
513
+  (0.0ms) begin transaction
514
+ [paperclip] Scheduling attachments for deletion.
515
+ SQL (0.5ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 24]]
516
+ [paperclip] Deleting attachments.
517
+ [paperclip] deleting public/system/books/22/assets/test_doc.jpg
518
+  (1.4ms) commit transaction
519
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '22'
520
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.6ms)
521
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
522
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.3ms)
523
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.7ms)
524
+ Completed 200 OK in 15ms (Views: 5.1ms | ActiveRecord: 3.3ms)
525
+ SQL (2.7ms) DELETE FROM "books_assets"
526
+ SQL (1.9ms) DELETE FROM "books_assets"
527
+ SQL (1.9ms) DELETE FROM "books"
528
+  (0.1ms) begin transaction
529
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
530
+  (2.8ms) commit transaction
531
+  (0.1ms) begin transaction
532
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 23
533
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 23], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
534
+ [paperclip] Saving attachments.
535
+ [paperclip] saving public/system/books/23/assets/test_doc.jpg
536
+  (2.6ms) commit transaction
537
+ Processing by Books::AssetsController#destroy as JS
538
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"23", "asset_id"=>"25"}
539
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "23"]]
540
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = '25' LIMIT 1
541
+  (0.0ms) begin transaction
542
+ [paperclip] Scheduling attachments for deletion.
543
+ SQL (0.7ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 25]]
544
+ [paperclip] Deleting attachments.
545
+ [paperclip] deleting public/system/books/23/assets/test_doc.jpg
546
+  (2.6ms) commit transaction
547
+ Books::Assets::TestDoc Load (0.5ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = '23'
548
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.6ms)
549
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
550
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
551
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.5ms)
552
+ Completed 200 OK in 19ms (Views: 5.5ms | ActiveRecord: 4.3ms)
553
+ SQL (3.3ms) DELETE FROM "books_assets"
554
+ SQL (2.2ms) DELETE FROM "books_assets"
555
+ SQL (6.7ms) DELETE FROM "books"
556
+  (0.1ms) begin transaction
557
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
558
+  (2.4ms) commit transaction
559
+  (0.1ms) begin transaction
560
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 24
561
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:12:44 UTC +00:00], ["book_id", 24], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
562
+ [paperclip] Saving attachments.
563
+ [paperclip] saving public/system/books/24/assets/test_doc.jpg
564
+  (2.7ms) commit transaction
565
+ Processing by Books::AssetsController#get as HTML
566
+ Parameters: {"book_id"=>"24", "asset_id"=>"26", "type"=>"Assets/TestDoc"}
567
+ Books::Assets::TestDoc Load (0.5ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? LIMIT 1 [["id", "26"]]
568
+ Sent file public/system/books/24/assets/test_doc.jpg (0.2ms)
569
+ Completed 200 OK in 8ms (ActiveRecord: 0.5ms)
570
+ SQL (3.6ms) DELETE FROM "books_assets"
571
+ SQL (1.8ms) DELETE FROM "books_assets"
572
+ SQL (2.5ms) DELETE FROM "books"
573
+  (0.4ms) begin transaction
574
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
575
+  (1.3ms) commit transaction
576
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m.jpg[0]'
577
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb'
578
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb[0]'
579
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb20120424-55344-aybc2g'
580
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb[0]'
581
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-hhw27m20120424-55344-1rgs0lb20120424-55344-eyhp11'
582
+  (0.2ms) begin transaction
583
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 25
584
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:12:45 UTC +00:00], ["book_id", 25], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
585
+ [paperclip] Saving attachments.
586
+ [paperclip] saving public/system/books/25/assets/original/test_image.jpg
587
+ [paperclip] saving public/system/books/25/assets/thumb/test_image.jpg
588
+ [paperclip] saving public/system/books/25/assets/medium/test_image.jpg
589
+  (2.1ms) commit transaction
590
+ Processing by Books::AssetsController#get as HTML
591
+ Parameters: {"book_id"=>"25", "asset_id"=>"27", "style"=>"thumb", "type"=>"Assets/TestImage"}
592
+ Books::Assets::TestImage Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."id" = ? LIMIT 1 [["id", "27"]]
593
+ Sent file public/system/books/25/assets/thumb/test_image.jpg (0.2ms)
594
+ Completed 200 OK in 4ms (ActiveRecord: 0.4ms)
595
+ SQL (1.9ms) DELETE FROM "books_assets"
596
+ SQL (1.8ms) DELETE FROM "books_assets"
597
+ SQL (2.5ms) DELETE FROM "books"
598
+  (0.1ms) begin transaction
599
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
600
+  (1.7ms) commit transaction
601
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn.jpg[0]'
602
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x'
603
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x[0]'
604
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x20120424-55344-1wk6qlx'
605
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x[0]'
606
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/stream20120424-55344-5re5hn20120424-55344-1dgc6x20120424-55344-a61z8a'
607
+  (0.2ms) begin transaction
608
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 26
609
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:12:45 UTC +00:00], ["book_id", 26], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
610
+ [paperclip] Saving attachments.
611
+ [paperclip] saving public/system/books/26/assets/original/test_image.jpg
612
+ [paperclip] saving public/system/books/26/assets/thumb/test_image.jpg
613
+ [paperclip] saving public/system/books/26/assets/medium/test_image.jpg
614
+  (2.7ms) commit transaction
615
+ Processing by Books::AssetsController#get as HTML
616
+ Parameters: {"book_id"=>"26", "asset_id"=>"28", "style"=>"thumb", "type"=>"Assets/TestImage"}
617
+ Books::Assets::TestImage Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."id" = ? LIMIT 1 [["id", "28"]]
618
+ Sent file public/system/books/26/assets/thumb/test_image.jpg (0.3ms)
619
+ Completed 200 OK in 4ms (ActiveRecord: 0.3ms)
620
+ Command :: identify -format %wx%h '/opt/code/fractalgarden/acts_as_assets/spec/temp/test.jpg[0]'
621
+ SQL (2.4ms) DELETE FROM "books_assets"
622
+ SQL (2.1ms) DELETE FROM "books_assets"
623
+ SQL (1.4ms) DELETE FROM "books"
624
+  (0.1ms) begin transaction
625
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
626
+  (1.5ms) commit transaction
627
+ Processing by Books::AssetsController#get as HTML
628
+ Parameters: {"book_id"=>"27", "asset_id"=>"123456789", "type"=>"Assets/TestDoc"}
629
+ Books::Assets::TestDoc Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? LIMIT 1 [["id", "123456789"]]
630
+ Completed 404 Not Found in 43ms (Views: 40.7ms | ActiveRecord: 0.2ms)
631
+ SQL (2.1ms) DELETE FROM "books_assets"
632
+ SQL (7.6ms) DELETE FROM "books_assets"
633
+ SQL (2.8ms) DELETE FROM "books"
634
+ SQL (17.5ms) DELETE FROM "books_assets"
635
+ SQL (2.0ms) DELETE FROM "books_assets"
636
+ SQL (1.5ms) DELETE FROM "books"
637
+ SQL (1.7ms) DELETE FROM "books_assets"
638
+ SQL (3.4ms) DELETE FROM "books_assets"
639
+ SQL (1.3ms) DELETE FROM "books"
640
+ SQL (2.8ms) DELETE FROM "books_assets"
641
+ SQL (1.7ms) DELETE FROM "books_assets"
642
+ SQL (1.4ms) DELETE FROM "books"
643
+ SQL (3.3ms) DELETE FROM "books_assets"
644
+ SQL (1.8ms) DELETE FROM "books_assets"
645
+ SQL (1.4ms) DELETE FROM "books"
646
+ SQL (1.9ms) DELETE FROM "books_assets"
647
+ SQL (2.0ms) DELETE FROM "books_assets"
648
+ SQL (1.3ms) DELETE FROM "books"
649
+ SQL (2.0ms) DELETE FROM "books_assets"
650
+ SQL (2.0ms) DELETE FROM "books_assets"
651
+ SQL (1.5ms) DELETE FROM "books"
652
+ SQL (2.1ms) DELETE FROM "books_assets"
653
+ SQL (2.5ms) DELETE FROM "books_assets"
654
+ SQL (1.6ms) DELETE FROM "books"
655
+ SQL (2.3ms) DELETE FROM "books_assets"
656
+ SQL (2.2ms) DELETE FROM "books_assets"
657
+ SQL (1.5ms) DELETE FROM "books"
658
+ SQL (2.4ms) DELETE FROM "books_assets"
659
+ SQL (2.1ms) DELETE FROM "books_assets"
660
+ SQL (2.1ms) DELETE FROM "books"
661
+ SQL (2.5ms) DELETE FROM "books_assets"
662
+ SQL (1.8ms) DELETE FROM "books_assets"
663
+ SQL (1.5ms) DELETE FROM "books"
664
+ SQL (1.8ms) DELETE FROM "books_assets"
665
+ SQL (2.0ms) DELETE FROM "books_assets"
666
+ SQL (1.4ms) DELETE FROM "books"
667
+  (0.1ms) begin transaction
668
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
669
+  (1.4ms) commit transaction
670
+  (0.1ms) begin transaction
671
+ Books::Assets::UniqueTestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
672
+  (0.2ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28
673
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 28], ["counter", 1], ["displayable", false], ["type", "Books::Assets::UniqueTestDoc"]]
674
+ [paperclip] Saving attachments.
675
+  (3.6ms) commit transaction
676
+  (0.1ms) begin transaction
677
+ Books::Assets::UniqueTestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
678
+  (0.1ms) rollback transaction
679
+ Books::Assets::UniqueTestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
680
+ Books::Assets::UniqueTestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
681
+ SQL (3.9ms) DELETE FROM "books_assets"
682
+ SQL (1.8ms) DELETE FROM "books_assets"
683
+ SQL (2.0ms) DELETE FROM "books"
684
+  (0.1ms) begin transaction
685
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
686
+  (1.3ms) commit transaction
687
+  (0.1ms) begin transaction
688
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 29
689
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 29], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
690
+ [paperclip] Saving attachments.
691
+  (2.4ms) commit transaction
692
+  (0.1ms) begin transaction
693
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 29
694
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 29], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
695
+ [paperclip] Saving attachments.
696
+  (2.0ms) commit transaction
697
+  (0.1ms) select sqlite_version(*)
698
+  (1.9ms) DROP TABLE "books"
699
+  (1.7ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
700
+  (2.9ms) DROP TABLE "books_assets"
701
+  (2.0ms) CREATE TABLE "books_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_file_name" varchar(255), "asset_content_type" varchar(255), "asset_file_size" integer, "asset_updated_at" datetime, "type" varchar(255), "counter" integer DEFAULT 0 NOT NULL, "book_id" integer, "displayable" boolean DEFAULT 'f' NOT NULL) 
702
+  (1.7ms) DROP TABLE "chapters"
703
+  (1.9ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
704
+  (2.1ms) DROP TABLE "chapters_assets"
705
+  (2.4ms) CREATE TABLE "chapters_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_file_name" varchar(255), "asset_content_type" varchar(255), "asset_file_size" integer, "asset_updated_at" datetime, "type" varchar(255), "counter" integer DEFAULT 0 NOT NULL, "chapter_name" varchar(255), "displayable" boolean DEFAULT 'f' NOT NULL) 
706
+  (1.8ms) DROP TABLE "rt_tipi_pannello"
707
+  (2.0ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
708
+  (2.0ms) DROP TABLE "rt_tipi_pannello_assets"
709
+  (2.8ms) CREATE TABLE "rt_tipi_pannello_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "asset_file_name" varchar(255), "asset_content_type" varchar(255), "asset_file_size" integer, "asset_updated_at" datetime, "type" varchar(255), "counter" integer DEFAULT 0 NOT NULL, "displayable" boolean DEFAULT 'f' NOT NULL, "tipo_pannello_name" varchar(255)) 
710
+ SQL (2.2ms) DELETE FROM "books_assets"
711
+ SQL (2.1ms) DELETE FROM "books_assets"
712
+ SQL (2.0ms) DELETE FROM "books"
713
+ SQL (2.7ms) DELETE FROM "books_assets"
714
+ SQL (2.0ms) DELETE FROM "books_assets"
715
+ SQL (2.1ms) DELETE FROM "books"
716
+ SQL (5.6ms) DELETE FROM "books_assets"
717
+ SQL (1.8ms) DELETE FROM "books_assets"
718
+ SQL (1.6ms) DELETE FROM "books"
719
+ SQL (2.5ms) DELETE FROM "books_assets"
720
+ SQL (2.1ms) DELETE FROM "books_assets"
721
+ SQL (1.4ms) DELETE FROM "books"
722
+ SQL (1.7ms) DELETE FROM "books_assets"
723
+ SQL (5.5ms) DELETE FROM "books_assets"
724
+ SQL (1.8ms) DELETE FROM "books"
725
+ SQL (2.3ms) DELETE FROM "books_assets"
726
+ SQL (2.0ms) DELETE FROM "books_assets"
727
+ SQL (2.1ms) DELETE FROM "books"
728
+ SQL (1.8ms) DELETE FROM "books_assets"
729
+ SQL (1.7ms) DELETE FROM "books_assets"
730
+ SQL (1.4ms) DELETE FROM "books"
731
+ SQL (2.0ms) DELETE FROM "books_assets"
732
+ SQL (1.8ms) DELETE FROM "books_assets"
733
+ SQL (3.5ms) DELETE FROM "books"
734
+ SQL (1.8ms) DELETE FROM "books_assets"
735
+ SQL (2.3ms) DELETE FROM "books_assets"
736
+ SQL (1.7ms) DELETE FROM "books"
737
+ SQL (1.9ms) DELETE FROM "books_assets"
738
+ SQL (1.8ms) DELETE FROM "books_assets"
739
+ SQL (1.8ms) DELETE FROM "books"
740
+  (0.1ms) begin transaction
741
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
742
+  (1.9ms) commit transaction
743
+  (0.1ms) begin transaction
744
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 1
745
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 1], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
746
+ [paperclip] Saving attachments.
747
+  (1.7ms) commit transaction
748
+ SQL (2.3ms) DELETE FROM "books_assets"
749
+ SQL (2.0ms) DELETE FROM "books_assets"
750
+ SQL (1.6ms) DELETE FROM "books"
751
+  (0.1ms) begin transaction
752
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
753
+  (1.5ms) commit transaction
754
+  (0.1ms) begin transaction
755
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 2
756
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 2], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
757
+ [paperclip] Saving attachments.
758
+  (1.7ms) commit transaction
759
+ SQL (1.7ms) DELETE FROM "books_assets"
760
+ SQL (1.8ms) DELETE FROM "books_assets"
761
+ SQL (1.9ms) DELETE FROM "books"
762
+  (0.1ms) begin transaction
763
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
764
+  (1.3ms) commit transaction
765
+  (0.0ms) begin transaction
766
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 3
767
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 3], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
768
+ [paperclip] Saving attachments.
769
+  (2.7ms) commit transaction
770
+ SQL (1.8ms) DELETE FROM "books_assets"
771
+ SQL (1.8ms) DELETE FROM "books_assets"
772
+ SQL (1.3ms) DELETE FROM "books"
773
+  (0.1ms) begin transaction
774
+ SQL (0.3ms) INSERT INTO "rt_tipi_pannello" ("name") VALUES (?) [["name", "Suntech STP"]]
775
+  (1.4ms) commit transaction
776
+  (0.1ms) begin transaction
777
+ TipiPannello::Documenti::SchedaTecnica Load (0.3ms) SELECT "rt_tipi_pannello_assets".* FROM "rt_tipi_pannello_assets" WHERE "rt_tipi_pannello_assets"."type" IN ('TipiPannello::Documenti::SchedaTecnica') AND "rt_tipi_pannello_assets"."tipo_pannello_name" = 'Suntech STP' LIMIT 1
778
+  (0.2ms) SELECT MAX("rt_tipi_pannello_assets"."counter") AS max_id FROM "rt_tipi_pannello_assets" WHERE "rt_tipi_pannello_assets"."type" IN ('TipiPannello::Documenti::SchedaTecnica') AND "rt_tipi_pannello_assets"."tipo_pannello_name" = 'Suntech STP'
779
+ SQL (11.5ms) INSERT INTO "rt_tipi_pannello_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "counter", "displayable", "tipo_pannello_name", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["counter", 1], ["displayable", false], ["tipo_pannello_name", "Suntech STP"], ["type", "TipiPannello::Documenti::SchedaTecnica"]]
780
+ [paperclip] Saving attachments.
781
+  (1.6ms) commit transaction
782
+ SQL (1.9ms) DELETE FROM "books_assets"
783
+ SQL (1.6ms) DELETE FROM "books_assets"
784
+ SQL (2.0ms) DELETE FROM "books"
785
+  (0.1ms) begin transaction
786
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
787
+  (1.7ms) commit transaction
788
+  (0.0ms) begin transaction
789
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 4
790
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 4], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
791
+ [paperclip] Saving attachments.
792
+  (1.8ms) commit transaction
793
+ SQL (2.9ms) DELETE FROM "books_assets"
794
+ SQL (1.9ms) DELETE FROM "books_assets"
795
+ SQL (1.6ms) DELETE FROM "books"
796
+  (0.2ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" IS NULL
797
+ SQL (2.6ms) DELETE FROM "books_assets"
798
+ SQL (2.0ms) DELETE FROM "books_assets"
799
+ SQL (1.6ms) DELETE FROM "books"
800
+  (0.1ms) begin transaction
801
+  (0.5ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" IS NULL
802
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", nil], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
803
+ [paperclip] Saving attachments.
804
+  (2.3ms) commit transaction
805
+  (0.1ms) begin transaction
806
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" IS NULL
807
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", nil], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
808
+ [paperclip] Saving attachments.
809
+  (2.4ms) commit transaction
810
+ Books::Asset Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 5]]
811
+ Books::Asset Load (0.1ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 6]]
812
+ SQL (2.1ms) DELETE FROM "books_assets"
813
+ SQL (1.8ms) DELETE FROM "books_assets"
814
+ SQL (1.4ms) DELETE FROM "books"
815
+  (0.1ms) begin transaction
816
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
817
+  (1.3ms) commit transaction
818
+  (0.1ms) begin transaction
819
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 5
820
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["book_id", 5], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
821
+ [paperclip] Saving attachments.
822
+  (3.1ms) commit transaction
823
+ SQL (2.3ms) DELETE FROM "books_assets"
824
+ SQL (2.0ms) DELETE FROM "books_assets"
825
+ SQL (1.7ms) DELETE FROM "books"
826
+  (0.1ms) begin transaction
827
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
828
+  (1.9ms) commit transaction
829
+  (0.1ms) begin transaction
830
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 6
831
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["book_id", 6], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
832
+ [paperclip] Saving attachments.
833
+  (2.1ms) commit transaction
834
+ SQL (1.8ms) DELETE FROM "books_assets"
835
+ SQL (1.8ms) DELETE FROM "books_assets"
836
+ SQL (1.5ms) DELETE FROM "books"
837
+  (0.1ms) begin transaction
838
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
839
+  (1.8ms) commit transaction
840
+  (0.1ms) begin transaction
841
+  (0.3ms) SELECT MAX("chapters_assets"."counter") AS max_id FROM "chapters_assets" WHERE "chapters_assets"."type" IN ('Chapters::Assets::Paragraph') AND "chapters_assets"."chapter_name" = 'a new chapter'
842
+ SQL (0.5ms) INSERT INTO "chapters_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "chapter_name", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 1], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
843
+ [paperclip] Saving attachments.
844
+  (2.0ms) commit transaction
845
+ SQL (2.1ms) DELETE FROM "books_assets"
846
+ SQL (2.2ms) DELETE FROM "books_assets"
847
+ SQL (1.9ms) DELETE FROM "books"
848
+  (0.1ms) begin transaction
849
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
850
+  (1.9ms) commit transaction
851
+  (0.1ms) begin transaction
852
+  (0.4ms) SELECT MAX("chapters_assets"."counter") AS max_id FROM "chapters_assets" WHERE "chapters_assets"."type" IN ('Chapters::Assets::Paragraph') AND "chapters_assets"."chapter_name" = 'a new chapter'
853
+ SQL (0.5ms) INSERT INTO "chapters_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "chapter_name", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 2], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
854
+ [paperclip] Saving attachments.
855
+  (1.7ms) commit transaction
856
+ SQL (1.8ms) DELETE FROM "books_assets"
857
+ SQL (2.0ms) DELETE FROM "books_assets"
858
+ SQL (1.9ms) DELETE FROM "books"
859
+ SQL (1.9ms) DELETE FROM "books_assets"
860
+ SQL (1.6ms) DELETE FROM "books_assets"
861
+ SQL (1.5ms) DELETE FROM "books"
862
+ SQL (1.7ms) DELETE FROM "books_assets"
863
+ SQL (1.9ms) DELETE FROM "books_assets"
864
+ SQL (1.8ms) DELETE FROM "books"
865
+  (0.1ms) begin transaction
866
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
867
+  (1.6ms) commit transaction
868
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-102m0gr[0]'
869
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-102m0gr[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav'
870
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav20120424-56060-4bdlum[0]'
871
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav20120424-56060-4bdlum[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav20120424-56060-4bdlum20120424-56060-14fxk89'
872
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav20120424-56060-4bdlum[0]'
873
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav20120424-56060-4bdlum[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1ncaqav20120424-56060-4bdlum20120424-56060-1n33ecl'
874
+  (0.1ms) begin transaction
875
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 7
876
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["book_id", 7], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
877
+ [paperclip] Saving attachments.
878
+  (1.8ms) commit transaction
879
+ SQL (2.0ms) DELETE FROM "books_assets"
880
+ SQL (2.5ms) DELETE FROM "books_assets"
881
+ SQL (1.9ms) DELETE FROM "books"
882
+  (0.1ms) begin transaction
883
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
884
+  (2.1ms) commit transaction
885
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-3z3cui[0]'
886
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-3z3cui[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd'
887
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd20120424-56060-1w3qonn[0]'
888
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd20120424-56060-1w3qonn[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd20120424-56060-1w3qonn20120424-56060-xxnvnv'
889
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd20120424-56060-1w3qonn[0]'
890
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd20120424-56060-1w3qonn[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1y9wsmd20120424-56060-1w3qonn20120424-56060-1m5o0bh'
891
+  (0.1ms) begin transaction
892
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 8
893
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:16:43 UTC +00:00], ["book_id", 8], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
894
+ [paperclip] Saving attachments.
895
+  (2.1ms) commit transaction
896
+ SQL (2.1ms) DELETE FROM "books_assets"
897
+ SQL (1.8ms) DELETE FROM "books_assets"
898
+ SQL (1.4ms) DELETE FROM "books"
899
+ SQL (2.0ms) DELETE FROM "books_assets"
900
+ SQL (2.4ms) DELETE FROM "books_assets"
901
+ SQL (2.1ms) DELETE FROM "books"
902
+ SQL (2.0ms) DELETE FROM "books_assets"
903
+ SQL (2.1ms) DELETE FROM "books_assets"
904
+ SQL (1.7ms) DELETE FROM "books"
905
+ SQL (2.1ms) DELETE FROM "books_assets"
906
+ SQL (2.0ms) DELETE FROM "books_assets"
907
+ SQL (2.3ms) DELETE FROM "books"
908
+ SQL (2.0ms) DELETE FROM "books_assets"
909
+ SQL (1.6ms) DELETE FROM "books_assets"
910
+ SQL (1.9ms) DELETE FROM "books"
911
+  (0.1ms) begin transaction
912
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
913
+  (1.6ms) commit transaction
914
+  (0.1ms) begin transaction
915
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 9
916
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 9], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
917
+ [paperclip] Saving attachments.
918
+  (1.5ms) commit transaction
919
+ Processing by Books::AssetsController#index as HTML
920
+ Parameters: {"multiple"=>true, "book_id"=>"9", "type"=>"Assets/TestDoc"}
921
+ Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "9"]]
922
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (63.0ms)
923
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 9
924
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.8ms)
925
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (4.2ms)
926
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (70.8ms)
927
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/index.html.erb (77.7ms)
928
+ Completed 200 OK in 163ms (Views: 160.2ms | ActiveRecord: 0.6ms)
929
+ SQL (1.6ms) DELETE FROM "books_assets"
930
+ SQL (1.8ms) DELETE FROM "books_assets"
931
+ SQL (2.2ms) DELETE FROM "books"
932
+  (0.1ms) begin transaction
933
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
934
+  (1.5ms) commit transaction
935
+  (0.1ms) begin transaction
936
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 10
937
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 10], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
938
+ [paperclip] Saving attachments.
939
+  (1.8ms) commit transaction
940
+ Processing by Books::AssetsController#index as HTML
941
+ Parameters: {"target"=>"target_div", "book_id"=>"10", "type"=>"Assets/TestDoc"}
942
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "10"]]
943
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.2ms)
944
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 10
945
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.1ms)
946
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.4ms)
947
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (5.0ms)
948
+ Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.5ms)
949
+ SQL (2.6ms) DELETE FROM "books_assets"
950
+ SQL (2.0ms) DELETE FROM "books_assets"
951
+ SQL (1.6ms) DELETE FROM "books"
952
+  (0.1ms) begin transaction
953
+ SQL (0.7ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
954
+  (1.6ms) commit transaction
955
+  (0.1ms) begin transaction
956
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 11
957
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 11], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
958
+ [paperclip] Saving attachments.
959
+  (1.5ms) commit transaction
960
+ Processing by Books::AssetsController#index as HTML
961
+ Parameters: {"target"=>"target_div", "book_id"=>"11", "type"=>"Assets/TestDoc"}
962
+ Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "11"]]
963
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.3ms)
964
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 11
965
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.0ms)
966
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.3ms)
967
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (4.9ms)
968
+ Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.4ms)
969
+ SQL (2.0ms) DELETE FROM "books_assets"
970
+ SQL (1.9ms) DELETE FROM "books_assets"
971
+ SQL (1.6ms) DELETE FROM "books"
972
+  (0.1ms) begin transaction
973
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
974
+  (1.4ms) commit transaction
975
+  (0.1ms) begin transaction
976
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 12
977
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 12], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
978
+ [paperclip] Saving attachments.
979
+  (1.9ms) commit transaction
980
+ Processing by Books::AssetsController#index as HTML
981
+ Parameters: {"target"=>"target_div", "book_id"=>"12", "type"=>"Assets/TestDoc"}
982
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "12"]]
983
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.5ms)
984
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 12
985
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (1.9ms)
986
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.2ms)
987
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (5.1ms)
988
+ Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.4ms)
989
+ SQL (2.1ms) DELETE FROM "books_assets"
990
+ SQL (2.0ms) DELETE FROM "books_assets"
991
+ SQL (1.6ms) DELETE FROM "books"
992
+  (0.1ms) begin transaction
993
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
994
+  (3.0ms) commit transaction
995
+  (0.1ms) begin transaction
996
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 13
997
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 13], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
998
+ [paperclip] Saving attachments.
999
+  (2.3ms) commit transaction
1000
+ Processing by Books::AssetsController#index as HTML
1001
+ Parameters: {"target"=>"target_div", "book_id"=>"13", "type"=>"Assets/TestDoc"}
1002
+ Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "13"]]
1003
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.2ms)
1004
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 13
1005
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (1.9ms)
1006
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.2ms)
1007
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (4.8ms)
1008
+ Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)
1009
+ SQL (2.2ms) DELETE FROM "books_assets"
1010
+ SQL (2.0ms) DELETE FROM "books_assets"
1011
+ SQL (1.7ms) DELETE FROM "books"
1012
+  (0.1ms) begin transaction
1013
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1014
+  (1.7ms) commit transaction
1015
+  (0.1ms) begin transaction
1016
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 14
1017
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 14], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1018
+ [paperclip] Saving attachments.
1019
+  (1.9ms) commit transaction
1020
+ Processing by Books::AssetsController#index as JSON
1021
+ Parameters: {"target"=>"target_div", "book_id"=>"14", "type"=>"Assets/TestDoc"}
1022
+ Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "14"]]
1023
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 14
1024
+ Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.4ms)
1025
+ SQL (2.1ms) DELETE FROM "books_assets"
1026
+ SQL (1.9ms) DELETE FROM "books_assets"
1027
+ SQL (1.7ms) DELETE FROM "books"
1028
+  (0.1ms) begin transaction
1029
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1030
+  (1.4ms) commit transaction
1031
+  (0.1ms) begin transaction
1032
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 15
1033
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 15], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1034
+ [paperclip] Saving attachments.
1035
+  (1.7ms) commit transaction
1036
+ Processing by Books::AssetsController#index as JSON
1037
+ Parameters: {"target"=>"target_div", "book_id"=>"15", "type"=>"Assets/TestDoc"}
1038
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "15"]]
1039
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 15
1040
+ Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.4ms)
1041
+ SQL (1.6ms) DELETE FROM "books_assets"
1042
+ SQL (1.9ms) DELETE FROM "books_assets"
1043
+ SQL (1.7ms) DELETE FROM "books"
1044
+  (0.1ms) begin transaction
1045
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1046
+  (1.7ms) commit transaction
1047
+ Processing by Books::AssetsController#create as JS
1048
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fa8ad8d85d0 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-1m6jchn>>, "book_id"=>"16", "type"=>"Assets/TestDoc"}
1049
+ Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "16"]]
1050
+  (0.1ms) begin transaction
1051
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 16
1052
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 16], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1053
+ [paperclip] Saving attachments.
1054
+  (1.7ms) commit transaction
1055
+ Books::Assets::TestDoc Load (0.5ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 16
1056
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (2.0ms)
1057
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.8ms)
1058
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (4.3ms)
1059
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (8.9ms)
1060
+ Completed 200 OK in 33ms (Views: 17.4ms | ActiveRecord: 3.6ms)
1061
+ SQL (1.9ms) DELETE FROM "books_assets"
1062
+ SQL (1.7ms) DELETE FROM "books_assets"
1063
+ SQL (1.6ms) DELETE FROM "books"
1064
+  (0.1ms) begin transaction
1065
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1066
+  (1.5ms) commit transaction
1067
+ Processing by Books::AssetsController#create as JS
1068
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fa8ac2e1b00 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-19vzndu>>, "book_id"=>"17", "type"=>"Assets/TestDoc"}
1069
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "17"]]
1070
+  (0.1ms) begin transaction
1071
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 17
1072
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 17], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1073
+ [paperclip] Saving attachments.
1074
+  (1.7ms) commit transaction
1075
+ Books::Assets::TestDoc Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 17
1076
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (57.7ms)
1077
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (3.0ms)
1078
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (3.7ms)
1079
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (62.1ms)
1080
+ Completed 200 OK in 76ms (Views: 64.0ms | ActiveRecord: 3.2ms)
1081
+ SQL (2.0ms) DELETE FROM "books_assets"
1082
+ SQL (1.9ms) DELETE FROM "books_assets"
1083
+ SQL (1.7ms) DELETE FROM "books"
1084
+  (0.1ms) begin transaction
1085
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1086
+  (1.7ms) commit transaction
1087
+ Processing by Books::AssetsController#create as JS
1088
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fa8aadf5f48 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-12n9uuj>>, "book_id"=>"18", "type"=>"Assets/TestDoc"}
1089
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "18"]]
1090
+  (0.1ms) begin transaction
1091
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 18
1092
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 18], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1093
+ [paperclip] Saving attachments.
1094
+  (1.6ms) commit transaction
1095
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 18
1096
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.4ms)
1097
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.0ms)
1098
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.3ms)
1099
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (4.2ms)
1100
+ Completed 200 OK in 18ms (Views: 6.0ms | ActiveRecord: 3.0ms)
1101
+ SQL (2.2ms) DELETE FROM "books_assets"
1102
+ SQL (1.7ms) DELETE FROM "books_assets"
1103
+ SQL (1.6ms) DELETE FROM "books"
1104
+  (0.1ms) begin transaction
1105
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1106
+  (1.5ms) commit transaction
1107
+ Processing by Books::AssetsController#create as JS
1108
+ Parameters: {"file"=>#<Rack::Test::UploadedFile:0x007fa8ac4d9ef8 @content_type="image/jpeg", @original_filename="jpg_test.jpg", @tempfile=#<File:/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-1sbcxxq>>, "book_id"=>"19", "type"=>"Assets/TestDoc"}
1109
+ Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "19"]]
1110
+  (0.1ms) begin transaction
1111
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 19
1112
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 19], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1113
+ [paperclip] Saving attachments.
1114
+  (2.0ms) commit transaction
1115
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 19
1116
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.4ms)
1117
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.0ms)
1118
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (2.2ms)
1119
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (4.1ms)
1120
+ Completed 200 OK in 17ms (Views: 5.8ms | ActiveRecord: 3.3ms)
1121
+ SQL (2.3ms) DELETE FROM "books_assets"
1122
+ SQL (1.9ms) DELETE FROM "books_assets"
1123
+ SQL (1.4ms) DELETE FROM "books"
1124
+  (0.1ms) begin transaction
1125
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1126
+  (1.4ms) commit transaction
1127
+  (0.1ms) begin transaction
1128
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 20
1129
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 20], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1130
+ [paperclip] Saving attachments.
1131
+  (1.7ms) commit transaction
1132
+ Processing by Books::AssetsController#destroy as JS
1133
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"20", "asset_id"=>"22"}
1134
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "20"]]
1135
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = 22 LIMIT 1
1136
+  (0.1ms) begin transaction
1137
+ [paperclip] Scheduling attachments for deletion.
1138
+ SQL (0.5ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 22]]
1139
+ [paperclip] Deleting attachments.
1140
+ [paperclip] deleting public/system/books/20/assets/test_doc.jpg
1141
+  (1.7ms) commit transaction
1142
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 20
1143
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.4ms)
1144
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
1145
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
1146
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.1ms)
1147
+ Completed 200 OK in 16ms (Views: 5.6ms | ActiveRecord: 3.0ms)
1148
+ SQL (1.9ms) DELETE FROM "books_assets"
1149
+ SQL (2.1ms) DELETE FROM "books_assets"
1150
+ SQL (1.7ms) DELETE FROM "books"
1151
+  (0.1ms) begin transaction
1152
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1153
+  (1.5ms) commit transaction
1154
+  (0.1ms) begin transaction
1155
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 21
1156
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 21], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1157
+ [paperclip] Saving attachments.
1158
+  (2.5ms) commit transaction
1159
+ Processing by Books::AssetsController#destroy as JS
1160
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"21", "asset_id"=>"23"}
1161
+ Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "21"]]
1162
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = 23 LIMIT 1
1163
+  (0.0ms) begin transaction
1164
+ [paperclip] Scheduling attachments for deletion.
1165
+ SQL (0.4ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 23]]
1166
+ [paperclip] Deleting attachments.
1167
+ [paperclip] deleting public/system/books/21/assets/test_doc.jpg
1168
+  (2.1ms) commit transaction
1169
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 21
1170
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.6ms)
1171
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
1172
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
1173
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.8ms)
1174
+ Completed 200 OK in 13ms (Views: 4.5ms | ActiveRecord: 3.2ms)
1175
+ SQL (2.1ms) DELETE FROM "books_assets"
1176
+ SQL (2.1ms) DELETE FROM "books_assets"
1177
+ SQL (2.3ms) DELETE FROM "books"
1178
+  (0.1ms) begin transaction
1179
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1180
+  (1.5ms) commit transaction
1181
+  (0.1ms) begin transaction
1182
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 22
1183
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 22], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1184
+ [paperclip] Saving attachments.
1185
+  (1.6ms) commit transaction
1186
+ Processing by Books::AssetsController#destroy as JS
1187
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"22", "asset_id"=>"24"}
1188
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "22"]]
1189
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = 24 LIMIT 1
1190
+  (0.0ms) begin transaction
1191
+ [paperclip] Scheduling attachments for deletion.
1192
+ SQL (0.5ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 24]]
1193
+ [paperclip] Deleting attachments.
1194
+ [paperclip] deleting public/system/books/22/assets/test_doc.jpg
1195
+  (1.5ms) commit transaction
1196
+ Books::Assets::TestDoc Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 22
1197
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.4ms)
1198
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
1199
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
1200
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.1ms)
1201
+ Completed 200 OK in 12ms (Views: 4.2ms | ActiveRecord: 2.6ms)
1202
+ SQL (1.9ms) DELETE FROM "books_assets"
1203
+ SQL (1.6ms) DELETE FROM "books_assets"
1204
+ SQL (1.5ms) DELETE FROM "books"
1205
+  (0.1ms) begin transaction
1206
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1207
+  (1.6ms) commit transaction
1208
+  (0.1ms) begin transaction
1209
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 23
1210
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 23], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1211
+ [paperclip] Saving attachments.
1212
+  (1.9ms) commit transaction
1213
+ Processing by Books::AssetsController#destroy as JS
1214
+ Parameters: {"type"=>"Assets/TestDoc", "target"=>"target_div", "book_id"=>"23", "asset_id"=>"25"}
1215
+ Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "23"]]
1216
+ Books::Assets::TestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = 25 LIMIT 1
1217
+  (0.0ms) begin transaction
1218
+ [paperclip] Scheduling attachments for deletion.
1219
+ SQL (0.4ms) DELETE FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? [["id", 25]]
1220
+ [paperclip] Deleting attachments.
1221
+ [paperclip] deleting public/system/books/23/assets/test_doc.jpg
1222
+  (1.5ms) commit transaction
1223
+ Books::Assets::TestDoc Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 23
1224
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (1.4ms)
1225
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (0.0ms)
1226
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (0.2ms)
1227
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (2.0ms)
1228
+ Completed 200 OK in 12ms (Views: 3.6ms | ActiveRecord: 2.7ms)
1229
+ SQL (1.8ms) DELETE FROM "books_assets"
1230
+ SQL (2.1ms) DELETE FROM "books_assets"
1231
+ SQL (1.6ms) DELETE FROM "books"
1232
+  (0.1ms) begin transaction
1233
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1234
+  (1.4ms) commit transaction
1235
+  (0.5ms) begin transaction
1236
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 24
1237
+ SQL (0.5ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 11392], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 24], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1238
+ [paperclip] Saving attachments.
1239
+  (1.9ms) commit transaction
1240
+ Processing by Books::AssetsController#get as HTML
1241
+ Parameters: {"book_id"=>"24", "asset_id"=>"26", "type"=>"Assets/TestDoc"}
1242
+ Books::Assets::TestDoc Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? LIMIT 1 [["id", "26"]]
1243
+ Sent file public/system/books/24/assets/test_doc.jpg (0.2ms)
1244
+ Completed 200 OK in 4ms (ActiveRecord: 0.4ms)
1245
+ SQL (2.8ms) DELETE FROM "books_assets"
1246
+ SQL (2.0ms) DELETE FROM "books_assets"
1247
+ SQL (1.7ms) DELETE FROM "books"
1248
+  (0.1ms) begin transaction
1249
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1250
+  (2.0ms) commit transaction
1251
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-137182h[0]'
1252
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-137182h[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e'
1253
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e20120424-56060-1lwt1uo[0]'
1254
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e20120424-56060-1lwt1uo[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e20120424-56060-1lwt1uo20120424-56060-1xx4999'
1255
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e20120424-56060-1lwt1uo[0]'
1256
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e20120424-56060-1lwt1uo[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-g7as3e20120424-56060-1lwt1uo20120424-56060-1wtarkd'
1257
+  (0.1ms) begin transaction
1258
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 25
1259
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:16:44 UTC +00:00], ["book_id", 25], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
1260
+ [paperclip] Saving attachments.
1261
+  (1.9ms) commit transaction
1262
+ Processing by Books::AssetsController#get as HTML
1263
+ Parameters: {"book_id"=>"25", "asset_id"=>"27", "style"=>"thumb", "type"=>"Assets/TestImage"}
1264
+ Books::Assets::TestImage Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."id" = ? LIMIT 1 [["id", "27"]]
1265
+ Sent file public/system/books/25/assets/thumb/test_image.jpg (0.2ms)
1266
+ Completed 200 OK in 5ms (ActiveRecord: 0.4ms)
1267
+ SQL (2.0ms) DELETE FROM "books_assets"
1268
+ SQL (2.0ms) DELETE FROM "books_assets"
1269
+ SQL (1.8ms) DELETE FROM "books"
1270
+  (0.1ms) begin transaction
1271
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1272
+  (1.4ms) commit transaction
1273
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-1pjw9kp[0]'
1274
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test.jpg20120424-56060-1pjw9kp[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl0'
1275
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl020120424-56060-h3md1k[0]'
1276
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl020120424-56060-h3md1k[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl020120424-56060-h3md1k20120424-56060-1i2drlz'
1277
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl020120424-56060-h3md1k[0]'
1278
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl020120424-56060-h3md1k[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120424-56060-1g3kjl020120424-56060-h3md1k20120424-56060-4xa7r7'
1279
+  (0.1ms) begin transaction
1280
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."book_id" = 26
1281
+ SQL (0.6ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", "image/jpeg"], ["asset_file_name", "jpg_test.jpg"], ["asset_file_size", 12923], ["asset_updated_at", Tue, 24 Apr 2012 10:16:45 UTC +00:00], ["book_id", 26], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
1282
+ [paperclip] Saving attachments.
1283
+  (1.9ms) commit transaction
1284
+ Processing by Books::AssetsController#get as HTML
1285
+ Parameters: {"book_id"=>"26", "asset_id"=>"28", "style"=>"thumb", "type"=>"Assets/TestImage"}
1286
+ Books::Assets::TestImage Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestImage') AND "books_assets"."id" = ? LIMIT 1 [["id", "28"]]
1287
+ Sent file public/system/books/26/assets/thumb/test_image.jpg (0.2ms)
1288
+ Completed 200 OK in 3ms (ActiveRecord: 0.3ms)
1289
+ Command :: identify -format %wx%h '/opt/code/fractalgarden/acts_as_assets/spec/temp/test.jpg[0]'
1290
+ SQL (1.7ms) DELETE FROM "books_assets"
1291
+ SQL (1.7ms) DELETE FROM "books_assets"
1292
+ SQL (1.4ms) DELETE FROM "books"
1293
+  (0.1ms) begin transaction
1294
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1295
+  (1.3ms) commit transaction
1296
+ Processing by Books::AssetsController#get as HTML
1297
+ Parameters: {"book_id"=>"27", "asset_id"=>"123456789", "type"=>"Assets/TestDoc"}
1298
+ Books::Assets::TestDoc Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."id" = ? LIMIT 1 [["id", "123456789"]]
1299
+ Completed 404 Not Found in 10ms (Views: 7.3ms | ActiveRecord: 0.2ms)
1300
+ SQL (1.9ms) DELETE FROM "books_assets"
1301
+ SQL (2.3ms) DELETE FROM "books_assets"
1302
+ SQL (1.8ms) DELETE FROM "books"
1303
+ SQL (2.1ms) DELETE FROM "books_assets"
1304
+ SQL (1.9ms) DELETE FROM "books_assets"
1305
+ SQL (1.6ms) DELETE FROM "books"
1306
+ SQL (2.2ms) DELETE FROM "books_assets"
1307
+ SQL (2.0ms) DELETE FROM "books_assets"
1308
+ SQL (1.7ms) DELETE FROM "books"
1309
+ SQL (1.8ms) DELETE FROM "books_assets"
1310
+ SQL (1.9ms) DELETE FROM "books_assets"
1311
+ SQL (1.8ms) DELETE FROM "books"
1312
+ SQL (2.4ms) DELETE FROM "books_assets"
1313
+ SQL (2.0ms) DELETE FROM "books_assets"
1314
+ SQL (1.7ms) DELETE FROM "books"
1315
+ SQL (1.7ms) DELETE FROM "books_assets"
1316
+ SQL (1.4ms) DELETE FROM "books_assets"
1317
+ SQL (1.4ms) DELETE FROM "books"
1318
+ SQL (5.8ms) DELETE FROM "books_assets"
1319
+ SQL (2.1ms) DELETE FROM "books_assets"
1320
+ SQL (2.1ms) DELETE FROM "books"
1321
+ SQL (2.3ms) DELETE FROM "books_assets"
1322
+ SQL (1.9ms) DELETE FROM "books_assets"
1323
+ SQL (2.1ms) DELETE FROM "books"
1324
+ SQL (1.9ms) DELETE FROM "books_assets"
1325
+ SQL (2.4ms) DELETE FROM "books_assets"
1326
+ SQL (2.0ms) DELETE FROM "books"
1327
+ SQL (2.2ms) DELETE FROM "books_assets"
1328
+ SQL (1.6ms) DELETE FROM "books_assets"
1329
+ SQL (3.0ms) DELETE FROM "books"
1330
+ SQL (2.2ms) DELETE FROM "books_assets"
1331
+ SQL (2.0ms) DELETE FROM "books_assets"
1332
+ SQL (1.7ms) DELETE FROM "books"
1333
+ SQL (2.0ms) DELETE FROM "books_assets"
1334
+ SQL (2.1ms) DELETE FROM "books_assets"
1335
+ SQL (1.7ms) DELETE FROM "books"
1336
+  (0.1ms) begin transaction
1337
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1338
+  (1.4ms) commit transaction
1339
+  (0.1ms) begin transaction
1340
+ Books::Assets::UniqueTestDoc Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
1341
+  (0.2ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28
1342
+ SQL (0.4ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 28], ["counter", 1], ["displayable", false], ["type", "Books::Assets::UniqueTestDoc"]]
1343
+ [paperclip] Saving attachments.
1344
+  (1.8ms) commit transaction
1345
+  (0.1ms) begin transaction
1346
+ Books::Assets::UniqueTestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
1347
+  (0.1ms) rollback transaction
1348
+ Books::Assets::UniqueTestDoc Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
1349
+ Books::Assets::UniqueTestDoc Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 28 LIMIT 1
1350
+ SQL (1.8ms) DELETE FROM "books_assets"
1351
+ SQL (1.6ms) DELETE FROM "books_assets"
1352
+ SQL (2.0ms) DELETE FROM "books"
1353
+  (0.1ms) begin transaction
1354
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
1355
+  (1.4ms) commit transaction
1356
+  (0.1ms) begin transaction
1357
+  (0.3ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 29
1358
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 29], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1359
+ [paperclip] Saving attachments.
1360
+  (1.7ms) commit transaction
1361
+  (0.0ms) begin transaction
1362
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::TestDoc') AND "books_assets"."book_id" = 29
1363
+ SQL (0.3ms) INSERT INTO "books_assets" ("asset_content_type", "asset_file_name", "asset_file_size", "asset_updated_at", "book_id", "counter", "displayable", "type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["asset_content_type", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 29], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
1364
+ [paperclip] Saving attachments.
1365
+  (1.9ms) commit transaction