acts_as_assets 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -82,7 +82,7 @@ class ActsAsAssets::AssetsController < ApplicationController
82
82
  # takes a type params string like "my/asset/type_of_documento"
83
83
  # and convert into My::Asset::TypeOfDocument constant
84
84
  def klazz
85
- @type.camelize.constantize
85
+ params[:type].camelize.constantize
86
86
  end
87
87
 
88
88
  def assign_target
@@ -1,48 +1,60 @@
1
1
  module ActionView
2
2
  module Helpers
3
3
  class FormBuilder
4
- def asset_upload(method, type, *args)
5
- @template.asset_upload_tag(@object, method, type, *args)
4
+ def asset_upload(methods, *args)
5
+ @template.asset_upload_tag(@object, methods, *args)
6
6
  end
7
7
 
8
- def asset_multiple_upload(method, type, *args)
9
- @template.asset_multiple_upload_tag(@object, method, type, *args)
8
+ def asset_multiple_upload(methods, *args)
9
+ @template.asset_multiple_upload_tag(@object, methods, *args)
10
10
  end
11
11
 
12
- def asset_label(method, type)
13
- @template.asset_label_tag(@object, method, type)
12
+ def asset_label(methods, type)
13
+ @template.asset_label_tag(@object, methods, type)
14
14
  end
15
15
  end
16
16
 
17
17
  module FormTagHelper
18
- def asset_multiple_upload_tag(model, methods, type, *args)
18
+ def asset_multiple_upload_tag(model, methods, *args)
19
19
  options = args.extract_options!
20
+ type = nil
21
+ type = args.first if args.size == 2
20
22
  asset_upload_helper(model, methods, type, "acts_as_assets/assets/asset_multiple_upload", options)
21
23
  end
22
24
 
23
- def asset_upload_tag(model, methods, type, *args)
25
+ def asset_upload_tag(model, methods, *args)
24
26
  options = args.extract_options!
27
+ type = nil
28
+ type = args.first if args.size == 2
25
29
  asset_upload_helper(model, methods, type, "acts_as_assets/assets/asset_upload", options)
26
30
  end
27
31
 
28
- private
29
-
30
32
  # +methods+ can be a sym that will be the method name and it will be called
31
33
  # against the model passed or can an array of symbols and will be chained in a method call
32
34
  # for instance
33
35
  # asset_upload_tag(@pratica, [:back_office, :allegati], ...)
34
36
  # will call @pratica.back_office.allegati
35
37
  def asset_upload_helper(model, methods, type, partial, options)
38
+ type ||= get_type_from_association(model, methods)
36
39
  render partial: partial,
37
- locals: {:@type => type, model: model, assets: model_assets(methods, model),
38
- association: Array(methods).last,
39
- read_only: options[:read_only]}
40
+ locals: {:@type => type, model: model, assets: asset_instances(model, methods), read_only: options[:read_only]}
40
41
  end
41
42
 
42
- def model_assets(methods, model)
43
+ def asset_instances(model, methods)
43
44
  Array(methods).inject(model) { |object, method| object.send(method) }
44
45
  end
45
46
 
47
+ def get_type_from_association(model, methods)
48
+ meths = Array(methods).dup
49
+
50
+ association_name = meths.pop
51
+
52
+ unless meths.empty?
53
+ model = asset_instances(model, meths)
54
+ end
55
+
56
+ model.association(association_name).klass.to_s.underscore
57
+ end
46
58
  end
47
59
  end
48
60
  end
@@ -1,3 +1,3 @@
1
1
  module ActsAsAssets
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
Binary file
@@ -15571,3 +15571,1041 @@ Completed 404 Not Found in 8ms (Views: 5.7ms | ActiveRecord: 0.2ms)
15571
15571
  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", 28], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15572
15572
  [paperclip] Saving attachments.
15573
15573
   (2.7ms) commit transaction
15574
+ Connecting to database specified by database.yml
15575
+ Connecting to database specified by database.yml
15576
+  (0.1ms) select sqlite_version(*)
15577
+  (51.2ms) DROP TABLE "books"
15578
+  (2.2ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
15579
+  (3.0ms) DROP TABLE "books_assets"
15580
+  (2.5ms) 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) 
15581
+  (2.5ms) DROP TABLE "chapters"
15582
+  (2.2ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
15583
+  (2.3ms) DROP TABLE "chapters_assets"
15584
+  (2.5ms) 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) 
15585
+  (2.3ms) DROP TABLE "rt_tipi_pannello"
15586
+  (2.4ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
15587
+  (4.2ms) DROP TABLE "rt_tipi_pannello_assets"
15588
+  (2.5ms) 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)) 
15589
+ SQL (2.7ms) DELETE FROM "books_assets"
15590
+ SQL (2.2ms) DELETE FROM "books_assets"
15591
+ SQL (2.0ms) DELETE FROM "books"
15592
+ Connecting to database specified by database.yml
15593
+  (0.1ms) select sqlite_version(*)
15594
+  (3.8ms) DROP TABLE "books"
15595
+  (2.0ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
15596
+  (2.2ms) DROP TABLE "books_assets"
15597
+  (2.1ms) 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) 
15598
+  (2.1ms) DROP TABLE "chapters"
15599
+  (2.6ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
15600
+  (2.2ms) DROP TABLE "chapters_assets"
15601
+  (2.7ms) 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) 
15602
+  (2.4ms) DROP TABLE "rt_tipi_pannello"
15603
+  (2.4ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
15604
+  (2.1ms) DROP TABLE "rt_tipi_pannello_assets"
15605
+  (2.3ms) 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)) 
15606
+ SQL (2.2ms) DELETE FROM "books_assets"
15607
+ SQL (10.2ms) DELETE FROM "books_assets"
15608
+ SQL (1.8ms) DELETE FROM "books"
15609
+ Connecting to database specified by database.yml
15610
+  (0.1ms) select sqlite_version(*)
15611
+  (2.5ms) DROP TABLE "books"
15612
+  (1.8ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
15613
+  (2.6ms) DROP TABLE "books_assets"
15614
+  (2.3ms) 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) 
15615
+  (2.1ms) DROP TABLE "chapters"
15616
+  (2.3ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
15617
+  (2.9ms) DROP TABLE "chapters_assets"
15618
+  (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) 
15619
+  (1.8ms) DROP TABLE "rt_tipi_pannello"
15620
+  (2.9ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
15621
+  (3.9ms) DROP TABLE "rt_tipi_pannello_assets"
15622
+  (2.4ms) 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)) 
15623
+ SQL (1.9ms) DELETE FROM "books_assets"
15624
+ SQL (1.9ms) DELETE FROM "books_assets"
15625
+ SQL (2.1ms) DELETE FROM "books"
15626
+ SQL (1.9ms) DELETE FROM "books_assets"
15627
+ SQL (2.9ms) DELETE FROM "books_assets"
15628
+ SQL (1.7ms) DELETE FROM "books"
15629
+ SQL (2.6ms) DELETE FROM "books_assets"
15630
+ SQL (2.1ms) DELETE FROM "books_assets"
15631
+ SQL (1.6ms) DELETE FROM "books"
15632
+ SQL (2.0ms) DELETE FROM "books_assets"
15633
+ SQL (2.0ms) DELETE FROM "books_assets"
15634
+ SQL (1.9ms) DELETE FROM "books"
15635
+ SQL (2.4ms) DELETE FROM "books_assets"
15636
+ SQL (2.0ms) DELETE FROM "books_assets"
15637
+ SQL (1.7ms) DELETE FROM "books"
15638
+ SQL (4.9ms) DELETE FROM "books_assets"
15639
+ SQL (2.4ms) DELETE FROM "books_assets"
15640
+ SQL (2.5ms) DELETE FROM "books"
15641
+ SQL (2.1ms) DELETE FROM "books_assets"
15642
+ SQL (2.2ms) DELETE FROM "books_assets"
15643
+ SQL (3.1ms) DELETE FROM "books"
15644
+ SQL (1.8ms) DELETE FROM "books_assets"
15645
+ SQL (2.5ms) DELETE FROM "books_assets"
15646
+ SQL (1.5ms) DELETE FROM "books"
15647
+ SQL (3.0ms) DELETE FROM "books_assets"
15648
+ SQL (2.2ms) DELETE FROM "books_assets"
15649
+ SQL (1.6ms) DELETE FROM "books"
15650
+ SQL (1.9ms) DELETE FROM "books_assets"
15651
+ SQL (2.0ms) DELETE FROM "books_assets"
15652
+ SQL (2.0ms) DELETE FROM "books"
15653
+  (0.1ms) begin transaction
15654
+ SQL (0.6ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15655
+  (2.0ms) commit transaction
15656
+  (0.1ms) begin transaction
15657
+  (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
15658
+ 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", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 1], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15659
+ [paperclip] Saving attachments.
15660
+  (2.0ms) commit transaction
15661
+ SQL (2.0ms) DELETE FROM "books_assets"
15662
+ SQL (3.4ms) DELETE FROM "books_assets"
15663
+ SQL (1.7ms) DELETE FROM "books"
15664
+  (0.1ms) begin transaction
15665
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15666
+  (1.5ms) commit transaction
15667
+  (0.1ms) begin transaction
15668
+  (0.9ms) 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
15669
+ 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", 2], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15670
+ [paperclip] Saving attachments.
15671
+  (2.2ms) commit transaction
15672
+ SQL (3.0ms) DELETE FROM "books_assets"
15673
+ SQL (2.9ms) DELETE FROM "books_assets"
15674
+ SQL (1.7ms) DELETE FROM "books"
15675
+  (0.1ms) begin transaction
15676
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15677
+  (1.8ms) commit transaction
15678
+  (0.1ms) begin transaction
15679
+  (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
15680
+ 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", nil], ["asset_file_name", nil], ["asset_file_size", nil], ["asset_updated_at", nil], ["book_id", 3], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15681
+ [paperclip] Saving attachments.
15682
+  (1.6ms) commit transaction
15683
+ SQL (2.6ms) DELETE FROM "books_assets"
15684
+ SQL (2.1ms) DELETE FROM "books_assets"
15685
+ SQL (5.4ms) DELETE FROM "books"
15686
+  (0.1ms) begin transaction
15687
+ SQL (0.5ms) INSERT INTO "rt_tipi_pannello" ("name") VALUES (?) [["name", "Suntech STP"]]
15688
+  (2.7ms) commit transaction
15689
+  (0.1ms) begin transaction
15690
+ 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
15691
+  (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'
15692
+ SQL (26.6ms) 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", Wed, 20 Jun 2012 13:36:25 UTC +00:00], ["counter", 1], ["displayable", false], ["tipo_pannello_name", "Suntech STP"], ["type", "TipiPannello::Documenti::SchedaTecnica"]]
15693
+ [paperclip] Saving attachments.
15694
+  (1.6ms) commit transaction
15695
+ SQL (7.6ms) DELETE FROM "books_assets"
15696
+ SQL (2.5ms) DELETE FROM "books_assets"
15697
+ SQL (1.6ms) DELETE FROM "books"
15698
+  (0.1ms) begin transaction
15699
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15700
+  (3.8ms) commit transaction
15701
+  (0.1ms) begin transaction
15702
+  (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
15703
+ 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"]]
15704
+ [paperclip] Saving attachments.
15705
+  (2.6ms) commit transaction
15706
+ SQL (2.2ms) DELETE FROM "books_assets"
15707
+ SQL (2.1ms) DELETE FROM "books_assets"
15708
+ SQL (1.6ms) DELETE FROM "books"
15709
+  (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
15710
+ SQL (5.9ms) DELETE FROM "books_assets"
15711
+ SQL (2.4ms) DELETE FROM "books_assets"
15712
+ SQL (2.5ms) DELETE FROM "books"
15713
+  (0.1ms) begin transaction
15714
+  (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
15715
+ 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"]]
15716
+ [paperclip] Saving attachments.
15717
+  (1.7ms) commit transaction
15718
+  (0.1ms) begin transaction
15719
+  (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
15720
+ 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", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15721
+ [paperclip] Saving attachments.
15722
+  (12.1ms) commit transaction
15723
+ Books::Asset Load (0.3ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 5]]
15724
+ Books::Asset Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 6]]
15725
+ SQL (2.1ms) DELETE FROM "books_assets"
15726
+ SQL (2.7ms) DELETE FROM "books_assets"
15727
+ SQL (3.1ms) DELETE FROM "books"
15728
+  (0.1ms) begin transaction
15729
+ SQL (0.7ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15730
+  (1.5ms) commit transaction
15731
+  (0.8ms) begin transaction
15732
+  (0.8ms) 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
15733
+ SQL (2.0ms) 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", Wed, 20 Jun 2012 13:36:26 UTC +00:00], ["book_id", 5], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15734
+ [paperclip] Saving attachments.
15735
+  (2.0ms) commit transaction
15736
+ SQL (4.1ms) DELETE FROM "books_assets"
15737
+ SQL (2.4ms) DELETE FROM "books_assets"
15738
+ SQL (1.9ms) DELETE FROM "books"
15739
+  (0.1ms) begin transaction
15740
+ SQL (0.7ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15741
+  (1.9ms) commit transaction
15742
+  (0.1ms) begin transaction
15743
+  (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" = 6
15744
+ 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", 11392], ["asset_updated_at", Wed, 20 Jun 2012 13:36:26 UTC +00:00], ["book_id", 6], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15745
+ [paperclip] Saving attachments.
15746
+  (2.9ms) commit transaction
15747
+ SQL (2.1ms) DELETE FROM "books_assets"
15748
+ SQL (1.9ms) DELETE FROM "books_assets"
15749
+ SQL (2.7ms) DELETE FROM "books"
15750
+  (0.1ms) begin transaction
15751
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
15752
+  (1.8ms) commit transaction
15753
+  (0.1ms) begin transaction
15754
+  (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'
15755
+ SQL (0.6ms) 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", Wed, 20 Jun 2012 13:36:26 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 1], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
15756
+ [paperclip] Saving attachments.
15757
+  (1.8ms) commit transaction
15758
+ SQL (2.6ms) DELETE FROM "books_assets"
15759
+ SQL (2.7ms) DELETE FROM "books_assets"
15760
+ SQL (1.8ms) DELETE FROM "books"
15761
+  (0.1ms) begin transaction
15762
+ SQL (0.5ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
15763
+  (1.6ms) commit transaction
15764
+  (0.1ms) begin transaction
15765
+  (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'
15766
+ 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", Wed, 20 Jun 2012 13:36:26 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 2], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
15767
+ [paperclip] Saving attachments.
15768
+  (1.6ms) commit transaction
15769
+ SQL (2.1ms) DELETE FROM "books_assets"
15770
+ SQL (4.1ms) DELETE FROM "books_assets"
15771
+ SQL (1.7ms) DELETE FROM "books"
15772
+ SQL (7.1ms) DELETE FROM "books_assets"
15773
+ SQL (2.3ms) DELETE FROM "books_assets"
15774
+ SQL (3.8ms) DELETE FROM "books"
15775
+ SQL (2.2ms) DELETE FROM "books_assets"
15776
+ SQL (3.9ms) DELETE FROM "books_assets"
15777
+ SQL (1.7ms) DELETE FROM "books"
15778
+  (0.1ms) begin transaction
15779
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15780
+  (5.6ms) commit transaction
15781
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg.jpg[0]'
15782
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg.jpg[0]'
15783
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg.jpg[0]'
15784
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl'
15785
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o'
15786
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]'
15787
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]'
15788
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]'
15789
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o20120620-2659-1bh6z0a'
15790
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o20120620-2659-1bh6z0a20120620-2659-108jo3z'
15791
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]'
15792
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]'
15793
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]'
15794
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o20120620-2659-1jsa2p8'
15795
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-qmsabg20120620-2659-1mjirbl20120620-2659-fjtu0o20120620-2659-1jsa2p820120620-2659-69vzm4'
15796
+  (0.2ms) begin transaction
15797
+  (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
15798
+ 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", Wed, 20 Jun 2012 13:36:26 UTC +00:00], ["book_id", 7], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
15799
+ [paperclip] Saving attachments.
15800
+  (1.9ms) commit transaction
15801
+ SQL (3.4ms) DELETE FROM "books_assets"
15802
+ SQL (2.3ms) DELETE FROM "books_assets"
15803
+ SQL (1.6ms) DELETE FROM "books"
15804
+  (0.1ms) begin transaction
15805
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15806
+  (2.6ms) commit transaction
15807
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he.jpg[0]'
15808
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he.jpg[0]'
15809
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he.jpg[0]'
15810
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin5'
15811
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw'
15812
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]'
15813
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]'
15814
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]'
15815
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw20120620-2659-7gnhli'
15816
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw20120620-2659-7gnhli20120620-2659-y9cfld'
15817
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]'
15818
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]'
15819
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]'
15820
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw20120620-2659-y17jis'
15821
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2659-abb4he20120620-2659-164bin520120620-2659-phubqw20120620-2659-y17jis20120620-2659-iur90d'
15822
+  (0.2ms) begin transaction
15823
+  (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
15824
+ SQL (0.8ms) 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", Wed, 20 Jun 2012 13:36:27 UTC +00:00], ["book_id", 8], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
15825
+ [paperclip] Saving attachments.
15826
+  (2.4ms) commit transaction
15827
+ SQL (2.3ms) DELETE FROM "books_assets"
15828
+ SQL (2.5ms) DELETE FROM "books_assets"
15829
+ SQL (1.6ms) DELETE FROM "books"
15830
+ SQL (2.0ms) DELETE FROM "books_assets"
15831
+ SQL (2.0ms) DELETE FROM "books_assets"
15832
+ SQL (1.8ms) DELETE FROM "books"
15833
+ SQL (1.9ms) DELETE FROM "books_assets"
15834
+ SQL (1.7ms) DELETE FROM "books_assets"
15835
+ SQL (2.9ms) DELETE FROM "books"
15836
+ SQL (1.8ms) DELETE FROM "books_assets"
15837
+ SQL (2.3ms) DELETE FROM "books_assets"
15838
+ SQL (1.6ms) DELETE FROM "books"
15839
+ SQL (3.5ms) DELETE FROM "books_assets"
15840
+ SQL (2.3ms) DELETE FROM "books_assets"
15841
+ SQL (1.8ms) DELETE FROM "books"
15842
+ SQL (1.9ms) DELETE FROM "books_assets"
15843
+ SQL (2.2ms) DELETE FROM "books_assets"
15844
+ SQL (2.3ms) DELETE FROM "books"
15845
+ SQL (8.9ms) DELETE FROM "books_assets"
15846
+ SQL (4.0ms) DELETE FROM "books_assets"
15847
+ SQL (3.0ms) DELETE FROM "books"
15848
+ SQL (3.5ms) DELETE FROM "books_assets"
15849
+ SQL (2.0ms) DELETE FROM "books_assets"
15850
+ SQL (1.6ms) DELETE FROM "books"
15851
+ SQL (2.5ms) DELETE FROM "books_assets"
15852
+ SQL (2.6ms) DELETE FROM "books_assets"
15853
+ SQL (1.8ms) DELETE FROM "books"
15854
+ SQL (1.9ms) DELETE FROM "books_assets"
15855
+ SQL (3.6ms) DELETE FROM "books_assets"
15856
+ SQL (1.9ms) DELETE FROM "books"
15857
+ SQL (3.7ms) DELETE FROM "books_assets"
15858
+ SQL (1.9ms) DELETE FROM "books_assets"
15859
+ SQL (1.6ms) DELETE FROM "books"
15860
+ SQL (2.0ms) DELETE FROM "books_assets"
15861
+ SQL (1.9ms) DELETE FROM "books_assets"
15862
+ SQL (2.0ms) DELETE FROM "books"
15863
+ SQL (2.8ms) DELETE FROM "books_assets"
15864
+ SQL (3.9ms) DELETE FROM "books_assets"
15865
+ SQL (6.2ms) DELETE FROM "books"
15866
+ SQL (1.7ms) DELETE FROM "books_assets"
15867
+ SQL (1.7ms) DELETE FROM "books_assets"
15868
+ SQL (1.4ms) DELETE FROM "books"
15869
+ SQL (2.1ms) DELETE FROM "books_assets"
15870
+ SQL (2.6ms) DELETE FROM "books_assets"
15871
+ SQL (1.5ms) DELETE FROM "books"
15872
+ SQL (1.9ms) DELETE FROM "books_assets"
15873
+ SQL (1.8ms) DELETE FROM "books_assets"
15874
+ SQL (1.6ms) DELETE FROM "books"
15875
+ SQL (1.9ms) DELETE FROM "books_assets"
15876
+ SQL (2.2ms) DELETE FROM "books_assets"
15877
+ SQL (1.4ms) DELETE FROM "books"
15878
+  (0.1ms) begin transaction
15879
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15880
+  (1.3ms) commit transaction
15881
+  (0.1ms) begin transaction
15882
+ Books::Assets::UniqueTestDoc Load (0.8ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 9 LIMIT 1
15883
+  (0.4ms) SELECT MAX("books_assets"."counter") AS max_id FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 9
15884
+ 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", 9], ["counter", 1], ["displayable", false], ["type", "Books::Assets::UniqueTestDoc"]]
15885
+ [paperclip] Saving attachments.
15886
+  (1.6ms) commit transaction
15887
+  (0.1ms) begin transaction
15888
+ 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" = 9 LIMIT 1
15889
+  (0.1ms) rollback transaction
15890
+ Books::Assets::UniqueTestDoc Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 9 LIMIT 1
15891
+ 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" = 9 LIMIT 1
15892
+ SQL (2.0ms) DELETE FROM "books_assets"
15893
+ SQL (1.8ms) DELETE FROM "books_assets"
15894
+ SQL (1.5ms) DELETE FROM "books"
15895
+  (0.1ms) begin transaction
15896
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15897
+  (1.4ms) commit transaction
15898
+  (0.1ms) begin transaction
15899
+  (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" = 10
15900
+ 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", 10], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15901
+ [paperclip] Saving attachments.
15902
+  (1.7ms) commit transaction
15903
+  (0.0ms) begin transaction
15904
+  (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
15905
+ 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", 10], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15906
+ [paperclip] Saving attachments.
15907
+  (1.8ms) commit transaction
15908
+ Connecting to database specified by database.yml
15909
+  (0.2ms) select sqlite_version(*)
15910
+  (3.8ms) DROP TABLE "books"
15911
+  (2.1ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
15912
+  (3.6ms) DROP TABLE "books_assets"
15913
+  (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) 
15914
+  (1.9ms) DROP TABLE "chapters"
15915
+  (2.1ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
15916
+  (2.2ms) DROP TABLE "chapters_assets"
15917
+  (2.1ms) 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) 
15918
+  (2.1ms) DROP TABLE "rt_tipi_pannello"
15919
+  (1.9ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
15920
+  (1.9ms) DROP TABLE "rt_tipi_pannello_assets"
15921
+  (2.0ms) 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)) 
15922
+ SQL (3.4ms) DELETE FROM "books_assets"
15923
+ SQL (3.4ms) DELETE FROM "books_assets"
15924
+ SQL (2.2ms) DELETE FROM "books"
15925
+  (0.1ms) begin transaction
15926
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15927
+  (1.7ms) commit transaction
15928
+  (0.1ms) begin transaction
15929
+  (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
15930
+ SQL (2.1ms) 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", Wed, 20 Jun 2012 13:41:27 UTC +00:00], ["book_id", 1], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15931
+ [paperclip] Saving attachments.
15932
+  (1.6ms) commit transaction
15933
+ Processing by Books::AssetsController#index as HTML
15934
+ Parameters: {"multiple"=>true, "fk_name"=>"1", "type"=>"books/assets/test_doc"}
15935
+ Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "1"]]
15936
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (6.2ms)
15937
+ 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" = 1
15938
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (2.9ms)
15939
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (4.3ms)
15940
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (14.5ms)
15941
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/index.html.erb (21.4ms)
15942
+ Completed 200 OK in 78ms (Views: 74.2ms | ActiveRecord: 0.6ms)
15943
+ Connecting to database specified by database.yml
15944
+  (0.1ms) select sqlite_version(*)
15945
+  (3.6ms) DROP TABLE "books"
15946
+  (1.6ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
15947
+  (2.2ms) DROP TABLE "books_assets"
15948
+  (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) 
15949
+  (1.9ms) DROP TABLE "chapters"
15950
+  (1.8ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
15951
+  (1.8ms) DROP TABLE "chapters_assets"
15952
+  (3.2ms) 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) 
15953
+  (5.5ms) DROP TABLE "rt_tipi_pannello"
15954
+  (5.8ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
15955
+  (2.1ms) DROP TABLE "rt_tipi_pannello_assets"
15956
+  (2.0ms) 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)) 
15957
+ SQL (2.1ms) DELETE FROM "books_assets"
15958
+ SQL (2.2ms) DELETE FROM "books_assets"
15959
+ SQL (1.6ms) DELETE FROM "books"
15960
+  (0.1ms) begin transaction
15961
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
15962
+  (1.4ms) commit transaction
15963
+  (0.1ms) begin transaction
15964
+  (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
15965
+ SQL (1.8ms) 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", Wed, 20 Jun 2012 13:42:06 UTC +00:00], ["book_id", 1], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
15966
+ [paperclip] Saving attachments.
15967
+  (2.0ms) commit transaction
15968
+ Processing by Books::AssetsController#index as HTML
15969
+ Parameters: {"multiple"=>true, "fk_name"=>"1", "type"=>"books/assets/test_doc"}
15970
+ Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", "1"]]
15971
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_upload_link.html.erb (6.7ms)
15972
+ 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" = 1
15973
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset.html.erb (3.2ms)
15974
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_assets.html.erb (4.8ms)
15975
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/_asset_multiple_upload.html.erb (15.4ms)
15976
+ Rendered /opt/code/fractalgarden/acts_as_assets/app/views/acts_as_assets/assets/index.html.erb (24.0ms)
15977
+ Completed 200 OK in 39ms (Views: 35.2ms | ActiveRecord: 0.6ms)
15978
+ Connecting to database specified by database.yml
15979
+  (0.1ms) select sqlite_version(*)
15980
+  (3.2ms) DROP TABLE "books"
15981
+  (1.8ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
15982
+  (2.1ms) DROP TABLE "books_assets"
15983
+  (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) 
15984
+  (2.0ms) DROP TABLE "chapters"
15985
+  (2.2ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
15986
+  (2.0ms) DROP TABLE "chapters_assets"
15987
+  (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) 
15988
+  (2.4ms) DROP TABLE "rt_tipi_pannello"
15989
+  (2.0ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
15990
+  (2.6ms) DROP TABLE "rt_tipi_pannello_assets"
15991
+  (2.1ms) 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)) 
15992
+ SQL (1.7ms) DELETE FROM "books_assets"
15993
+ SQL (2.0ms) DELETE FROM "books_assets"
15994
+ SQL (1.7ms) DELETE FROM "books"
15995
+ SQL (2.6ms) DELETE FROM "books_assets"
15996
+ SQL (2.0ms) DELETE FROM "books_assets"
15997
+ SQL (1.6ms) DELETE FROM "books"
15998
+ SQL (3.2ms) DELETE FROM "books_assets"
15999
+ SQL (2.1ms) DELETE FROM "books_assets"
16000
+ SQL (1.6ms) DELETE FROM "books"
16001
+ SQL (2.3ms) DELETE FROM "books_assets"
16002
+ SQL (6.5ms) DELETE FROM "books_assets"
16003
+ SQL (1.8ms) DELETE FROM "books"
16004
+ SQL (2.2ms) DELETE FROM "books_assets"
16005
+ SQL (2.8ms) DELETE FROM "books_assets"
16006
+ SQL (1.8ms) DELETE FROM "books"
16007
+ SQL (2.2ms) DELETE FROM "books_assets"
16008
+ SQL (1.7ms) DELETE FROM "books_assets"
16009
+ SQL (2.5ms) DELETE FROM "books"
16010
+ SQL (2.6ms) DELETE FROM "books_assets"
16011
+ SQL (2.0ms) DELETE FROM "books_assets"
16012
+ SQL (1.6ms) DELETE FROM "books"
16013
+ SQL (2.9ms) DELETE FROM "books_assets"
16014
+ SQL (2.3ms) DELETE FROM "books_assets"
16015
+ SQL (2.0ms) DELETE FROM "books"
16016
+ SQL (2.0ms) DELETE FROM "books_assets"
16017
+ SQL (3.0ms) DELETE FROM "books_assets"
16018
+ SQL (1.8ms) DELETE FROM "books"
16019
+ SQL (1.8ms) DELETE FROM "books_assets"
16020
+ SQL (2.5ms) DELETE FROM "books_assets"
16021
+ SQL (1.4ms) DELETE FROM "books"
16022
+  (0.1ms) begin transaction
16023
+ SQL (0.8ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16024
+  (4.3ms) commit transaction
16025
+  (0.1ms) begin transaction
16026
+  (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" = 1
16027
+ 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"]]
16028
+ [paperclip] Saving attachments.
16029
+  (2.2ms) commit transaction
16030
+ SQL (2.0ms) DELETE FROM "books_assets"
16031
+ SQL (1.9ms) DELETE FROM "books_assets"
16032
+ SQL (2.2ms) DELETE FROM "books"
16033
+  (0.1ms) begin transaction
16034
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16035
+  (1.4ms) commit transaction
16036
+  (0.1ms) begin transaction
16037
+  (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
16038
+ 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"]]
16039
+ [paperclip] Saving attachments.
16040
+  (1.8ms) commit transaction
16041
+ SQL (2.0ms) DELETE FROM "books_assets"
16042
+ SQL (1.8ms) DELETE FROM "books_assets"
16043
+ SQL (2.1ms) DELETE FROM "books"
16044
+  (0.1ms) begin transaction
16045
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16046
+  (2.2ms) commit transaction
16047
+  (0.1ms) begin transaction
16048
+  (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
16049
+ 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"]]
16050
+ [paperclip] Saving attachments.
16051
+  (2.1ms) commit transaction
16052
+ SQL (2.0ms) DELETE FROM "books_assets"
16053
+ SQL (1.7ms) DELETE FROM "books_assets"
16054
+ SQL (2.1ms) DELETE FROM "books"
16055
+  (0.1ms) begin transaction
16056
+ SQL (0.4ms) INSERT INTO "rt_tipi_pannello" ("name") VALUES (?) [["name", "Suntech STP"]]
16057
+  (1.6ms) commit transaction
16058
+  (0.1ms) begin transaction
16059
+ TipiPannello::Documenti::SchedaTecnica Load (0.7ms) 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
16060
+  (0.3ms) 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'
16061
+ SQL (1.8ms) 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", Wed, 20 Jun 2012 13:42:16 UTC +00:00], ["counter", 1], ["displayable", false], ["tipo_pannello_name", "Suntech STP"], ["type", "TipiPannello::Documenti::SchedaTecnica"]]
16062
+ [paperclip] Saving attachments.
16063
+  (1.6ms) commit transaction
16064
+ SQL (1.7ms) DELETE FROM "books_assets"
16065
+ SQL (1.5ms) DELETE FROM "books_assets"
16066
+ SQL (1.8ms) DELETE FROM "books"
16067
+  (0.1ms) begin transaction
16068
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16069
+  (1.2ms) commit transaction
16070
+  (0.0ms) begin transaction
16071
+  (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
16072
+ 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"]]
16073
+ [paperclip] Saving attachments.
16074
+  (1.7ms) commit transaction
16075
+ SQL (1.7ms) DELETE FROM "books_assets"
16076
+ SQL (2.1ms) DELETE FROM "books_assets"
16077
+ SQL (1.6ms) DELETE FROM "books"
16078
+  (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
16079
+ SQL (1.8ms) DELETE FROM "books_assets"
16080
+ SQL (1.5ms) DELETE FROM "books_assets"
16081
+ SQL (1.4ms) DELETE FROM "books"
16082
+  (0.1ms) begin transaction
16083
+  (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
16084
+ 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"]]
16085
+ [paperclip] Saving attachments.
16086
+  (3.3ms) commit transaction
16087
+  (0.1ms) begin transaction
16088
+  (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
16089
+ 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"]]
16090
+ [paperclip] Saving attachments.
16091
+  (1.7ms) commit transaction
16092
+ Books::Asset Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 5]]
16093
+ Books::Asset Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 6]]
16094
+ SQL (2.0ms) DELETE FROM "books_assets"
16095
+ SQL (1.7ms) DELETE FROM "books_assets"
16096
+ SQL (1.4ms) DELETE FROM "books"
16097
+  (0.1ms) begin transaction
16098
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16099
+  (2.1ms) commit transaction
16100
+  (0.1ms) begin transaction
16101
+  (0.7ms) 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
16102
+ SQL (1.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", 11392], ["asset_updated_at", Wed, 20 Jun 2012 13:42:16 UTC +00:00], ["book_id", 5], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16103
+ [paperclip] Saving attachments.
16104
+  (1.8ms) commit transaction
16105
+ SQL (3.0ms) DELETE FROM "books_assets"
16106
+ SQL (2.3ms) DELETE FROM "books_assets"
16107
+ SQL (1.8ms) DELETE FROM "books"
16108
+  (0.1ms) begin transaction
16109
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16110
+  (1.7ms) commit transaction
16111
+  (0.2ms) begin transaction
16112
+  (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" = 6
16113
+ 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", Wed, 20 Jun 2012 13:42:16 UTC +00:00], ["book_id", 6], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16114
+ [paperclip] Saving attachments.
16115
+  (1.9ms) commit transaction
16116
+ SQL (5.6ms) DELETE FROM "books_assets"
16117
+ SQL (1.7ms) DELETE FROM "books_assets"
16118
+ SQL (1.7ms) DELETE FROM "books"
16119
+  (0.1ms) begin transaction
16120
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
16121
+  (2.2ms) commit transaction
16122
+  (0.1ms) begin transaction
16123
+  (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'
16124
+ SQL (0.6ms) 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", Wed, 20 Jun 2012 13:42:16 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 1], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
16125
+ [paperclip] Saving attachments.
16126
+  (2.5ms) commit transaction
16127
+ SQL (2.0ms) DELETE FROM "books_assets"
16128
+ SQL (2.3ms) DELETE FROM "books_assets"
16129
+ SQL (1.6ms) DELETE FROM "books"
16130
+  (0.1ms) begin transaction
16131
+ SQL (0.5ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
16132
+  (1.8ms) commit transaction
16133
+  (0.1ms) begin transaction
16134
+  (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'
16135
+ SQL (0.4ms) 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", Wed, 20 Jun 2012 13:42:16 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 2], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
16136
+ [paperclip] Saving attachments.
16137
+  (2.3ms) commit transaction
16138
+ SQL (1.6ms) DELETE FROM "books_assets"
16139
+ SQL (1.8ms) DELETE FROM "books_assets"
16140
+ SQL (1.4ms) DELETE FROM "books"
16141
+ SQL (2.3ms) DELETE FROM "books_assets"
16142
+ SQL (1.9ms) DELETE FROM "books_assets"
16143
+ SQL (1.3ms) DELETE FROM "books"
16144
+ SQL (2.2ms) DELETE FROM "books_assets"
16145
+ SQL (1.9ms) DELETE FROM "books_assets"
16146
+ SQL (1.6ms) DELETE FROM "books"
16147
+  (0.1ms) begin transaction
16148
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16149
+  (1.9ms) commit transaction
16150
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz2.jpg[0]'
16151
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz2.jpg[0]'
16152
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz2.jpg[0]'
16153
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz2.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp'
16154
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g'
16155
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]'
16156
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]'
16157
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]'
16158
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g20120620-2804-1aoxkpe'
16159
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g20120620-2804-1aoxkpe20120620-2804-npxiya'
16160
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]'
16161
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]'
16162
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]'
16163
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g20120620-2804-4rpgfm'
16164
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-gm3cz220120620-2804-y4xghp20120620-2804-mn491g20120620-2804-4rpgfm20120620-2804-112vbh5'
16165
+  (0.1ms) begin transaction
16166
+  (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
16167
+ 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", Wed, 20 Jun 2012 13:42:17 UTC +00:00], ["book_id", 7], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
16168
+ [paperclip] Saving attachments.
16169
+  (1.9ms) commit transaction
16170
+ SQL (2.7ms) DELETE FROM "books_assets"
16171
+ SQL (1.8ms) DELETE FROM "books_assets"
16172
+ SQL (1.7ms) DELETE FROM "books"
16173
+  (0.1ms) begin transaction
16174
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16175
+  (2.4ms) commit transaction
16176
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m2.jpg[0]'
16177
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m2.jpg[0]'
16178
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m2.jpg[0]'
16179
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m2.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb'
16180
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n'
16181
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]'
16182
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]'
16183
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]'
16184
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n20120620-2804-c8ee5r'
16185
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n20120620-2804-c8ee5r20120620-2804-op6a9b'
16186
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]'
16187
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]'
16188
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]'
16189
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n20120620-2804-q0y9xv'
16190
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2804-139q8m220120620-2804-131t5zb20120620-2804-l8wm3n20120620-2804-q0y9xv20120620-2804-j4uprc'
16191
+  (0.2ms) begin transaction
16192
+  (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
16193
+ 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", Wed, 20 Jun 2012 13:42:17 UTC +00:00], ["book_id", 8], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
16194
+ [paperclip] Saving attachments.
16195
+  (1.9ms) commit transaction
16196
+ SQL (2.6ms) DELETE FROM "books_assets"
16197
+ SQL (3.0ms) DELETE FROM "books_assets"
16198
+ SQL (1.7ms) DELETE FROM "books"
16199
+ SQL (2.6ms) DELETE FROM "books_assets"
16200
+ SQL (2.0ms) DELETE FROM "books_assets"
16201
+ SQL (1.9ms) DELETE FROM "books"
16202
+ SQL (4.1ms) DELETE FROM "books_assets"
16203
+ SQL (76.7ms) DELETE FROM "books_assets"
16204
+ SQL (2.1ms) DELETE FROM "books"
16205
+ SQL (2.0ms) DELETE FROM "books_assets"
16206
+ SQL (1.8ms) DELETE FROM "books_assets"
16207
+ SQL (2.0ms) DELETE FROM "books"
16208
+ SQL (3.2ms) DELETE FROM "books_assets"
16209
+ SQL (2.1ms) DELETE FROM "books_assets"
16210
+ SQL (1.7ms) DELETE FROM "books"
16211
+ SQL (2.0ms) DELETE FROM "books_assets"
16212
+ SQL (2.1ms) DELETE FROM "books_assets"
16213
+ SQL (4.4ms) DELETE FROM "books"
16214
+ SQL (2.1ms) DELETE FROM "books_assets"
16215
+ SQL (2.0ms) DELETE FROM "books_assets"
16216
+ SQL (1.6ms) DELETE FROM "books"
16217
+ SQL (2.0ms) DELETE FROM "books_assets"
16218
+ SQL (1.8ms) DELETE FROM "books_assets"
16219
+ SQL (1.7ms) DELETE FROM "books"
16220
+ SQL (2.3ms) DELETE FROM "books_assets"
16221
+ SQL (1.7ms) DELETE FROM "books_assets"
16222
+ SQL (1.6ms) DELETE FROM "books"
16223
+ SQL (1.9ms) DELETE FROM "books_assets"
16224
+ SQL (1.9ms) DELETE FROM "books_assets"
16225
+ SQL (1.6ms) DELETE FROM "books"
16226
+ SQL (1.9ms) DELETE FROM "books_assets"
16227
+ SQL (1.8ms) DELETE FROM "books_assets"
16228
+ SQL (1.8ms) DELETE FROM "books"
16229
+ SQL (1.9ms) DELETE FROM "books_assets"
16230
+ SQL (1.8ms) DELETE FROM "books_assets"
16231
+ SQL (1.5ms) DELETE FROM "books"
16232
+ SQL (2.4ms) DELETE FROM "books_assets"
16233
+ SQL (2.1ms) DELETE FROM "books_assets"
16234
+ SQL (1.6ms) DELETE FROM "books"
16235
+ SQL (2.9ms) DELETE FROM "books_assets"
16236
+ SQL (1.9ms) DELETE FROM "books_assets"
16237
+ SQL (1.4ms) DELETE FROM "books"
16238
+ SQL (1.8ms) DELETE FROM "books_assets"
16239
+ SQL (2.4ms) DELETE FROM "books_assets"
16240
+ SQL (1.7ms) DELETE FROM "books"
16241
+ SQL (2.4ms) DELETE FROM "books_assets"
16242
+ SQL (1.8ms) DELETE FROM "books_assets"
16243
+ SQL (1.7ms) DELETE FROM "books"
16244
+ SQL (5.6ms) DELETE FROM "books_assets"
16245
+ SQL (1.9ms) DELETE FROM "books_assets"
16246
+ SQL (1.6ms) DELETE FROM "books"
16247
+  (0.1ms) begin transaction
16248
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16249
+  (1.5ms) commit transaction
16250
+  (0.1ms) begin transaction
16251
+ 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" = 9 LIMIT 1
16252
+  (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" = 9
16253
+ 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", 9], ["counter", 1], ["displayable", false], ["type", "Books::Assets::UniqueTestDoc"]]
16254
+ [paperclip] Saving attachments.
16255
+  (2.3ms) commit transaction
16256
+  (0.1ms) begin transaction
16257
+ 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" = 9 LIMIT 1
16258
+  (0.2ms) rollback transaction
16259
+ Books::Assets::UniqueTestDoc Load (0.4ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 9 LIMIT 1
16260
+ 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" = 9 LIMIT 1
16261
+ SQL (1.9ms) DELETE FROM "books_assets"
16262
+ SQL (1.8ms) DELETE FROM "books_assets"
16263
+ SQL (1.6ms) DELETE FROM "books"
16264
+  (0.1ms) begin transaction
16265
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16266
+  (1.5ms) commit transaction
16267
+  (0.0ms) begin transaction
16268
+  (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
16269
+ 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", 10], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16270
+ [paperclip] Saving attachments.
16271
+  (1.8ms) commit transaction
16272
+  (0.0ms) begin transaction
16273
+  (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
16274
+ 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", 10], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16275
+ [paperclip] Saving attachments.
16276
+  (2.1ms) commit transaction
16277
+ Connecting to database specified by database.yml
16278
+  (0.1ms) select sqlite_version(*)
16279
+  (3.4ms) DROP TABLE "books"
16280
+  (1.8ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
16281
+  (2.1ms) DROP TABLE "books_assets"
16282
+  (2.8ms) 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) 
16283
+  (2.1ms) DROP TABLE "chapters"
16284
+  (1.9ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
16285
+  (2.5ms) DROP TABLE "chapters_assets"
16286
+  (2.3ms) 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) 
16287
+  (1.9ms) DROP TABLE "rt_tipi_pannello"
16288
+  (1.7ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
16289
+  (7.6ms) DROP TABLE "rt_tipi_pannello_assets"
16290
+  (2.1ms) 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)) 
16291
+ SQL (2.8ms) DELETE FROM "books_assets"
16292
+ SQL (2.0ms) DELETE FROM "books_assets"
16293
+ SQL (1.6ms) DELETE FROM "books"
16294
+ Connecting to database specified by database.yml
16295
+  (0.1ms) select sqlite_version(*)
16296
+  (3.2ms) DROP TABLE "books"
16297
+  (1.7ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
16298
+  (1.9ms) DROP TABLE "books_assets"
16299
+  (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) 
16300
+  (2.0ms) DROP TABLE "chapters"
16301
+  (2.2ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
16302
+  (2.7ms) DROP TABLE "chapters_assets"
16303
+  (2.0ms) 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) 
16304
+  (1.7ms) DROP TABLE "rt_tipi_pannello"
16305
+  (1.8ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
16306
+  (2.4ms) DROP TABLE "rt_tipi_pannello_assets"
16307
+  (1.9ms) 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)) 
16308
+ SQL (1.9ms) DELETE FROM "books_assets"
16309
+ SQL (1.8ms) DELETE FROM "books_assets"
16310
+ SQL (1.6ms) DELETE FROM "books"
16311
+ SQL (2.3ms) DELETE FROM "books_assets"
16312
+ SQL (1.8ms) DELETE FROM "books_assets"
16313
+ SQL (1.7ms) DELETE FROM "books"
16314
+ SQL (2.1ms) DELETE FROM "books_assets"
16315
+ SQL (1.8ms) DELETE FROM "books_assets"
16316
+ SQL (1.5ms) DELETE FROM "books"
16317
+ SQL (1.9ms) DELETE FROM "books_assets"
16318
+ SQL (1.8ms) DELETE FROM "books_assets"
16319
+ SQL (2.1ms) DELETE FROM "books"
16320
+ SQL (2.0ms) DELETE FROM "books_assets"
16321
+ SQL (1.8ms) DELETE FROM "books_assets"
16322
+ SQL (1.5ms) DELETE FROM "books"
16323
+ SQL (9.0ms) DELETE FROM "books_assets"
16324
+ SQL (3.4ms) DELETE FROM "books_assets"
16325
+ SQL (1.7ms) DELETE FROM "books"
16326
+ SQL (1.8ms) DELETE FROM "books_assets"
16327
+ SQL (1.5ms) DELETE FROM "books_assets"
16328
+ SQL (1.5ms) DELETE FROM "books"
16329
+ SQL (1.9ms) DELETE FROM "books_assets"
16330
+ SQL (1.9ms) DELETE FROM "books_assets"
16331
+ SQL (1.6ms) DELETE FROM "books"
16332
+ SQL (1.8ms) DELETE FROM "books_assets"
16333
+ SQL (1.7ms) DELETE FROM "books_assets"
16334
+ SQL (1.6ms) DELETE FROM "books"
16335
+ SQL (1.9ms) DELETE FROM "books_assets"
16336
+ SQL (1.9ms) DELETE FROM "books_assets"
16337
+ SQL (1.2ms) DELETE FROM "books"
16338
+  (0.1ms) begin transaction
16339
+ SQL (0.5ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16340
+  (1.4ms) commit transaction
16341
+  (0.1ms) begin transaction
16342
+  (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
16343
+ 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"]]
16344
+ [paperclip] Saving attachments.
16345
+  (1.9ms) commit transaction
16346
+ SQL (10.3ms) DELETE FROM "books_assets"
16347
+ SQL (1.9ms) DELETE FROM "books_assets"
16348
+ SQL (1.5ms) DELETE FROM "books"
16349
+  (0.1ms) begin transaction
16350
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16351
+  (1.4ms) commit transaction
16352
+  (0.0ms) begin transaction
16353
+  (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
16354
+ 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", 2], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16355
+ [paperclip] Saving attachments.
16356
+  (1.7ms) commit transaction
16357
+ SQL (1.7ms) DELETE FROM "books_assets"
16358
+ SQL (2.4ms) DELETE FROM "books_assets"
16359
+ SQL (1.6ms) DELETE FROM "books"
16360
+  (0.1ms) begin transaction
16361
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16362
+  (1.5ms) commit transaction
16363
+  (0.1ms) begin transaction
16364
+  (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
16365
+ 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"]]
16366
+ [paperclip] Saving attachments.
16367
+  (1.8ms) commit transaction
16368
+ SQL (1.8ms) DELETE FROM "books_assets"
16369
+ SQL (1.8ms) DELETE FROM "books_assets"
16370
+ SQL (1.8ms) DELETE FROM "books"
16371
+  (0.1ms) begin transaction
16372
+ SQL (0.4ms) INSERT INTO "rt_tipi_pannello" ("name") VALUES (?) [["name", "Suntech STP"]]
16373
+  (1.5ms) commit transaction
16374
+  (0.1ms) begin transaction
16375
+ 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
16376
+  (0.3ms) 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'
16377
+ SQL (2.1ms) 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", Wed, 20 Jun 2012 13:42:59 UTC +00:00], ["counter", 1], ["displayable", false], ["tipo_pannello_name", "Suntech STP"], ["type", "TipiPannello::Documenti::SchedaTecnica"]]
16378
+ [paperclip] Saving attachments.
16379
+  (1.8ms) commit transaction
16380
+ SQL (1.8ms) DELETE FROM "books_assets"
16381
+ SQL (1.8ms) DELETE FROM "books_assets"
16382
+ SQL (2.5ms) DELETE FROM "books"
16383
+  (0.1ms) begin transaction
16384
+ SQL (0.6ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16385
+  (1.4ms) commit transaction
16386
+  (0.1ms) begin transaction
16387
+  (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
16388
+ 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"]]
16389
+ [paperclip] Saving attachments.
16390
+  (1.8ms) commit transaction
16391
+ SQL (1.9ms) DELETE FROM "books_assets"
16392
+ SQL (1.9ms) DELETE FROM "books_assets"
16393
+ SQL (1.6ms) DELETE FROM "books"
16394
+  (1.0ms) 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
16395
+ SQL (1.9ms) DELETE FROM "books_assets"
16396
+ SQL (2.0ms) DELETE FROM "books_assets"
16397
+ SQL (1.5ms) DELETE FROM "books"
16398
+  (0.1ms) begin transaction
16399
+  (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
16400
+ 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", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16401
+ [paperclip] Saving attachments.
16402
+  (2.1ms) commit transaction
16403
+  (0.1ms) begin transaction
16404
+  (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
16405
+ 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"]]
16406
+ [paperclip] Saving attachments.
16407
+  (1.8ms) commit transaction
16408
+ Books::Asset Load (0.2ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 5]]
16409
+ Books::Asset Load (0.1ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."id" = ? LIMIT 1 [["id", 6]]
16410
+ SQL (1.8ms) DELETE FROM "books_assets"
16411
+ SQL (1.8ms) DELETE FROM "books_assets"
16412
+ SQL (1.5ms) DELETE FROM "books"
16413
+  (0.1ms) begin transaction
16414
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16415
+  (1.3ms) commit transaction
16416
+  (0.1ms) begin transaction
16417
+  (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
16418
+ 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", Wed, 20 Jun 2012 13:42:59 UTC +00:00], ["book_id", 5], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16419
+ [paperclip] Saving attachments.
16420
+  (1.9ms) commit transaction
16421
+ SQL (1.8ms) DELETE FROM "books_assets"
16422
+ SQL (1.7ms) DELETE FROM "books_assets"
16423
+ SQL (1.3ms) DELETE FROM "books"
16424
+  (0.1ms) begin transaction
16425
+ SQL (0.8ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16426
+  (3.3ms) commit transaction
16427
+  (0.1ms) begin transaction
16428
+  (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
16429
+ 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", Wed, 20 Jun 2012 13:42:59 UTC +00:00], ["book_id", 6], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16430
+ [paperclip] Saving attachments.
16431
+  (1.8ms) commit transaction
16432
+ SQL (2.4ms) DELETE FROM "books_assets"
16433
+ SQL (1.5ms) DELETE FROM "books_assets"
16434
+ SQL (1.5ms) DELETE FROM "books"
16435
+  (0.1ms) begin transaction
16436
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
16437
+  (1.4ms) commit transaction
16438
+  (0.1ms) begin transaction
16439
+  (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'
16440
+ SQL (0.6ms) 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", Wed, 20 Jun 2012 13:42:59 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 1], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
16441
+ [paperclip] Saving attachments.
16442
+  (1.7ms) commit transaction
16443
+ SQL (1.6ms) DELETE FROM "books_assets"
16444
+ SQL (1.7ms) DELETE FROM "books_assets"
16445
+ SQL (1.5ms) DELETE FROM "books"
16446
+  (0.1ms) begin transaction
16447
+ SQL (0.4ms) INSERT INTO "chapters" ("name") VALUES (?) [["name", "a new chapter"]]
16448
+  (4.4ms) commit transaction
16449
+  (0.1ms) begin transaction
16450
+  (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'
16451
+ 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", Wed, 20 Jun 2012 13:42:59 UTC +00:00], ["chapter_name", "a new chapter"], ["counter", 2], ["displayable", false], ["type", "Chapters::Assets::Paragraph"]]
16452
+ [paperclip] Saving attachments.
16453
+  (1.7ms) commit transaction
16454
+ SQL (1.7ms) DELETE FROM "books_assets"
16455
+ SQL (1.5ms) DELETE FROM "books_assets"
16456
+ SQL (1.6ms) DELETE FROM "books"
16457
+ SQL (1.8ms) DELETE FROM "books_assets"
16458
+ SQL (1.7ms) DELETE FROM "books_assets"
16459
+ SQL (1.6ms) DELETE FROM "books"
16460
+ SQL (1.9ms) DELETE FROM "books_assets"
16461
+ SQL (2.0ms) DELETE FROM "books_assets"
16462
+ SQL (1.5ms) DELETE FROM "books"
16463
+  (0.1ms) begin transaction
16464
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16465
+  (1.4ms) commit transaction
16466
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx.jpg[0]'
16467
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx.jpg[0]'
16468
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx.jpg[0]'
16469
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t7'
16470
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios'
16471
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]'
16472
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]'
16473
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]'
16474
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios20120620-2877-u906sd'
16475
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios20120620-2877-u906sd20120620-2877-z8h3bc'
16476
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]'
16477
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]'
16478
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]'
16479
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios20120620-2877-qlqbst'
16480
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1gwa9nx20120620-2877-69s3t720120620-2877-c9aios20120620-2877-qlqbst20120620-2877-15qv067'
16481
+  (0.2ms) begin transaction
16482
+  (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
16483
+ 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", Wed, 20 Jun 2012 13:42:59 UTC +00:00], ["book_id", 7], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
16484
+ [paperclip] Saving attachments.
16485
+  (1.9ms) commit transaction
16486
+ SQL (4.7ms) DELETE FROM "books_assets"
16487
+ SQL (2.7ms) DELETE FROM "books_assets"
16488
+ SQL (1.5ms) DELETE FROM "books"
16489
+  (0.1ms) begin transaction
16490
+ SQL (0.4ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16491
+  (1.4ms) commit transaction
16492
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc5.jpg[0]'
16493
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc5.jpg[0]'
16494
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc5.jpg[0]'
16495
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc5.jpg[0]' -resize "800x600<" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker'
16496
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq'
16497
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]'
16498
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]'
16499
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]'
16500
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]' -resize "64x64" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq20120620-2877-dy53qe'
16501
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq20120620-2877-dy53qe20120620-2877-wzjhgm'
16502
+ Command :: identify -format %wx%h '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]'
16503
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]'
16504
+ Command :: identify -format %m '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]'
16505
+ Command :: convert '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq[0]' -resize "128x128" '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq20120620-2877-1phpg3x'
16506
+ Command :: file -b --mime '/var/folders/j4/5w5kx5qs2r78l195pj7dhxhh0000gn/T/jpg_test20120620-2877-1mjgnc520120620-2877-1s1eker20120620-2877-1sgjboq20120620-2877-1phpg3x20120620-2877-2vvfnb'
16507
+  (0.4ms) begin transaction
16508
+  (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
16509
+ 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", Wed, 20 Jun 2012 13:43:00 UTC +00:00], ["book_id", 8], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestImage"]]
16510
+ [paperclip] Saving attachments.
16511
+  (1.8ms) commit transaction
16512
+ SQL (2.7ms) DELETE FROM "books_assets"
16513
+ SQL (1.9ms) DELETE FROM "books_assets"
16514
+ SQL (1.6ms) DELETE FROM "books"
16515
+ SQL (3.6ms) DELETE FROM "books_assets"
16516
+ SQL (2.2ms) DELETE FROM "books_assets"
16517
+ SQL (1.7ms) DELETE FROM "books"
16518
+ SQL (2.4ms) DELETE FROM "books_assets"
16519
+ SQL (99.6ms) DELETE FROM "books_assets"
16520
+ SQL (1.8ms) DELETE FROM "books"
16521
+ SQL (1.8ms) DELETE FROM "books_assets"
16522
+ SQL (1.6ms) DELETE FROM "books_assets"
16523
+ SQL (1.6ms) DELETE FROM "books"
16524
+ SQL (3.7ms) DELETE FROM "books_assets"
16525
+ SQL (1.8ms) DELETE FROM "books_assets"
16526
+ SQL (1.5ms) DELETE FROM "books"
16527
+ SQL (2.0ms) DELETE FROM "books_assets"
16528
+ SQL (1.9ms) DELETE FROM "books_assets"
16529
+ SQL (1.5ms) DELETE FROM "books"
16530
+ SQL (1.8ms) DELETE FROM "books_assets"
16531
+ SQL (2.0ms) DELETE FROM "books_assets"
16532
+ SQL (2.5ms) DELETE FROM "books"
16533
+ SQL (2.3ms) DELETE FROM "books_assets"
16534
+ SQL (1.7ms) DELETE FROM "books_assets"
16535
+ SQL (1.4ms) DELETE FROM "books"
16536
+ SQL (2.6ms) DELETE FROM "books_assets"
16537
+ SQL (1.9ms) DELETE FROM "books_assets"
16538
+ SQL (1.7ms) DELETE FROM "books"
16539
+ SQL (2.2ms) DELETE FROM "books_assets"
16540
+ SQL (3.0ms) DELETE FROM "books_assets"
16541
+ SQL (1.4ms) DELETE FROM "books"
16542
+ SQL (2.0ms) DELETE FROM "books_assets"
16543
+ SQL (2.7ms) DELETE FROM "books_assets"
16544
+ SQL (1.6ms) DELETE FROM "books"
16545
+ SQL (1.7ms) DELETE FROM "books_assets"
16546
+ SQL (1.5ms) DELETE FROM "books_assets"
16547
+ SQL (1.4ms) DELETE FROM "books"
16548
+ SQL (1.8ms) DELETE FROM "books_assets"
16549
+ SQL (1.9ms) DELETE FROM "books_assets"
16550
+ SQL (1.5ms) DELETE FROM "books"
16551
+ SQL (2.3ms) DELETE FROM "books_assets"
16552
+ SQL (1.7ms) DELETE FROM "books_assets"
16553
+ SQL (1.5ms) DELETE FROM "books"
16554
+ SQL (1.9ms) DELETE FROM "books_assets"
16555
+ SQL (1.8ms) DELETE FROM "books_assets"
16556
+ SQL (2.0ms) DELETE FROM "books"
16557
+ SQL (2.0ms) DELETE FROM "books_assets"
16558
+ SQL (1.9ms) DELETE FROM "books_assets"
16559
+ SQL (1.5ms) DELETE FROM "books"
16560
+ SQL (1.7ms) DELETE FROM "books_assets"
16561
+ SQL (3.4ms) DELETE FROM "books_assets"
16562
+ SQL (1.4ms) DELETE FROM "books"
16563
+  (0.1ms) begin transaction
16564
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16565
+  (1.3ms) commit transaction
16566
+  (0.1ms) begin transaction
16567
+ 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" = 9 LIMIT 1
16568
+  (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" = 9
16569
+ 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", 9], ["counter", 1], ["displayable", false], ["type", "Books::Assets::UniqueTestDoc"]]
16570
+ [paperclip] Saving attachments.
16571
+  (1.8ms) commit transaction
16572
+  (0.1ms) begin transaction
16573
+ 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" = 9 LIMIT 1
16574
+  (0.1ms) rollback transaction
16575
+ Books::Assets::UniqueTestDoc Load (0.7ms) SELECT "books_assets".* FROM "books_assets" WHERE "books_assets"."type" IN ('Books::Assets::UniqueTestDoc') AND "books_assets"."book_id" = 9 LIMIT 1
16576
+ 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" = 9 LIMIT 1
16577
+ SQL (3.4ms) DELETE FROM "books_assets"
16578
+ SQL (1.7ms) DELETE FROM "books_assets"
16579
+ SQL (1.4ms) DELETE FROM "books"
16580
+  (0.1ms) begin transaction
16581
+ SQL (0.3ms) INSERT INTO "books" ("title") VALUES (?) [["title", "my new book"]]
16582
+  (1.3ms) commit transaction
16583
+  (0.1ms) begin transaction
16584
+  (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
16585
+ 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", 10], ["counter", 1], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16586
+ [paperclip] Saving attachments.
16587
+  (1.6ms) commit transaction
16588
+  (0.0ms) begin transaction
16589
+  (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
16590
+ 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", 10], ["counter", 2], ["displayable", false], ["type", "Books::Assets::TestDoc"]]
16591
+ [paperclip] Saving attachments.
16592
+  (1.7ms) commit transaction
16593
+ Connecting to database specified by database.yml
16594
+  (0.1ms) select sqlite_version(*)
16595
+  (4.2ms) DROP TABLE "books"
16596
+  (1.9ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255)) 
16597
+  (2.0ms) DROP TABLE "books_assets"
16598
+  (5.7ms) 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) 
16599
+  (7.1ms) DROP TABLE "chapters"
16600
+  (4.7ms) CREATE TABLE "chapters" ("name" varchar(255) NOT NULL) 
16601
+  (15.2ms) DROP TABLE "chapters_assets"
16602
+  (2.1ms) 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) 
16603
+  (1.9ms) DROP TABLE "rt_tipi_pannello"
16604
+  (5.8ms) CREATE TABLE "rt_tipi_pannello" ("name" varchar(255) NOT NULL) 
16605
+  (2.2ms) DROP TABLE "rt_tipi_pannello_assets"
16606
+  (1.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)) 
16607
+ SQL (2.0ms) DELETE FROM "books_assets"
16608
+ SQL (1.8ms) DELETE FROM "books_assets"
16609
+ SQL (1.6ms) DELETE FROM "books"
16610
+ Connecting to database specified by database.yml
16611
+ Connecting to database specified by database.yml