(0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (122.0ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (111.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (72.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "users" VALUES(NULL)  (101.4ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (116.2ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (164.6ms) commit transaction  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (115.6ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (122.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (167.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (61.9ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (424.1ms) commit transaction  (0.3ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (95.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (63.5ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:04:52 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (37.7ms) Completed 200 OK in 61ms (Views: 54.5ms | ActiveRecord: 1.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:04:52 +0400 2012 Compiled simple_attachments.js (0ms) (pid 21002) Compiled attachments.js (8ms) (pid 21002) Served asset /attachments.js - 304 Not Modified (20ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:04:52 +0400 2012 Compiled simple_attachments.css (0ms) (pid 21002) Compiled attachments.css (7ms) (pid 21002) Served asset /attachments.css - 200 OK (17ms) Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:06:10 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (37.0ms) Completed 200 OK in 60ms (Views: 53.5ms | ActiveRecord: 1.4ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:06:10 +0400 2012 Served asset /attachments.js - 304 Not Modified (10ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:06:10 +0400 2012 Served asset /attachments.css - 304 Not Modified (5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:06:23 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"m+bUFDqKPYXG3BatL9SFAG48UwZmCuFiGuvlGqzPnS8=", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part1.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"shen-logic-part1.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (17.1ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "shen-logic-part1.pdf"], ["filepath", "1330743983.91544.shen-logic-part1.pdf"], ["filesize", 929253], ["mimetype", "application/pdf"], ["user_id", nil]]  (119.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70169377556660 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 163ms (Views: 1.9ms | ActiveRecord: 137.4ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (114.9ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (61.9ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (94.8ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:11:33 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (61.7ms) Completed 200 OK in 202ms (Views: 194.4ms | ActiveRecord: 1.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:11:33 +0400 2012 Served asset /attachments.js - 200 OK (7ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:11:33 +0400 2012 Served asset /attachments.css - 200 OK (7ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:11:34 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:11:34 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:11:34 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4o/x1/PdzbVs2lqKYEvw9AzYc4k96prCVCrKiJ1qVic=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (20.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744294.55912.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (251.9ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 376ms (Views: 1.9ms | ActiveRecord: 272.4ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 07:11:34 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744294.55912.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.4ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (123.4ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 07:11:36 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:11:36 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4uFaYipjwvSrGjuhNlTw5iIgp5fKrXP77PT2EDI8SyE=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744296.94811.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (152.2ms) commit transaction Completed 200 OK in 159ms (Views: 0.5ms | ActiveRecord: 152.7ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 07:11:37 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744296.94811.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:11:39 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4uFaYipjwvSrGjuhNlTw5iIgp5fKrXP77PT2EDI8SyE=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 13ms (Views: 1.6ms | ActiveRecord: 0.4ms)  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (68.6ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 07:11:41 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 25ms (Views: 22.1ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:11:41 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"J9g4adIQJwzNQdSn8QdIbAuE3jQjb2ZpA+cMNrqr4FY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744301.75741.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (124.2ms) commit transaction Completed 200 OK in 131ms (Views: 0.5ms | ActiveRecord: 124.7ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:11:41 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744301.75741.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:11:43 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"J9g4adIQJwzNQdSn8QdIbAuE3jQjb2ZpA+cMNrqr4FY=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (2.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (108.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 136ms (Views: 8.6ms | ActiveRecord: 111.5ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:11:44 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744301.75741.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:11:44 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"J9g4adIQJwzNQdSn8QdIbAuE3jQjb2ZpA+cMNrqr4FY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744304.25529.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (128.2ms) commit transaction Completed 200 OK in 135ms (Views: 0.4ms | ActiveRecord: 128.7ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:11:44 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744304.25529.sample.jpg (0.2ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:11:46 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"J9g4adIQJwzNQdSn8QdIbAuE3jQjb2ZpA+cMNrqr4FY=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (129.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 159ms (Views: 10.1ms | ActiveRecord: 132.0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:11:46 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744304.25529.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (116.9ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 07:11:46 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.5ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:11:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+XJKWOB9m1qzZEoQa8+96eFDogj5Le+j47eRaSD10FA=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744307.08498.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (110.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69876435212980 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 136ms (Views: 0.8ms | ActiveRecord: 111.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:11:49 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+XJKWOB9m1qzZEoQa8+96eFDogj5Le+j47eRaSD10FA=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744309.25872.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (107.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69876435436360 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 117ms (Views: 0.5ms | ActiveRecord: 107.7ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (130.9ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.3ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (90.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (61.5ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (430.2ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:14:02 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (60.4ms) Completed 200 OK in 194ms (Views: 189.1ms | ActiveRecord: 1.4ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:14:02 +0400 2012 Served asset /attachments.js - 200 OK (8ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:14:02 +0400 2012 Compiled attachments.css (1ms) (pid 21188) Served asset /attachments.css - 200 OK (12ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:14:03 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:14:03 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:14:03 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"NB9EZ8Ox/Rf+a5yj2urQHk0E0JVjQ6Di+hz422BcLBs=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (19.7ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744443.49578.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (109.8ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 225ms (Views: 1.9ms | ActiveRecord: 129.6ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 07:14:03 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744443.49578.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "users" VALUES(NULL)  (105.4ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 07:14:05 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:14:06 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"lbijKEbHk96tgfnnaxaWjotlSknuxeAmbpYK6h9aT4I=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744446.09032.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (126.3ms) commit transaction Completed 200 OK in 133ms (Views: 0.5ms | ActiveRecord: 126.9ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 07:14:06 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744446.09032.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:14:08 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"lbijKEbHk96tgfnnaxaWjotlSknuxeAmbpYK6h9aT4I=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (1.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 117ms (Views: 0.8ms | ActiveRecord: 1.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (110.8ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 07:14:10 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:14:10 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:14:10 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tiVFIKaUfnRcqqW7SB09nkNf63MKegIhmatYaNTkqUs=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.5ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744450.76162.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (121.6ms) commit transaction Completed 200 OK in 133ms (Views: 0.5ms | ActiveRecord: 122.5ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:14:10 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744450.76162.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:14:13 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"tiVFIKaUfnRcqqW7SB09nkNf63MKegIhmatYaNTkqUs=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (75.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 104ms (Views: 9.1ms | ActiveRecord: 77.1ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:14:13 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:14:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744450.76162.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:14:13 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tiVFIKaUfnRcqqW7SB09nkNf63MKegIhmatYaNTkqUs=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744453.55965.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (118.9ms) commit transaction Completed 200 OK in 125ms (Views: 0.5ms | ActiveRecord: 119.2ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:14:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744453.55965.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:14:15 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"tiVFIKaUfnRcqqW7SB09nkNf63MKegIhmatYaNTkqUs=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (95.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 120ms (Views: 9.2ms | ActiveRecord: 97.1ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:14:15 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:14:15 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744453.55965.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (78.4ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 07:14:16 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 14ms (Views: 11.8ms | ActiveRecord: 0.5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:14:16 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:14:16 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"nJ+M59WOKE2+iGfrqXynZjgfis7F5p8GGeF29naLDvU=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744456.32318.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (74.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70009530143460 LIMIT 1  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 174ms (Views: 1.0ms | ActiveRecord: 75.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:14:18 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"nJ+M59WOKE2+iGfrqXynZjgfis7F5p8GGeF29naLDvU=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.3ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744458.42931.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (83.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70009532745300 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 96ms (Views: 0.5ms | ActiveRecord: 84.6ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (140.9ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (87.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (77.1ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (113.1ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:15:32 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (63.9ms) Completed 200 OK in 199ms (Views: 193.1ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:15:32 +0400 2012 Served asset /attachments.js - 200 OK (6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:15:32 +0400 2012 Compiled attachments.css (2ms) (pid 21278) Served asset /attachments.css - 200 OK (13ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:15:33 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:15:33 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:15:33 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"ISZLWvEohA2OD6h/wK/y320fEDQ8nvrhCw3lJCb4ayc=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (20.0ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744533.52631.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (120.4ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 247ms (Views: 1.9ms | ActiveRecord: 140.5ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 07:15:33 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744533.52631.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (118.7ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 07:15:35 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (1.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 1.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:15:36 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"6G7y5ySTvVSUO4hncoW5e973bloUSHaVSPEtmAx5nA0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744536.13208.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (126.1ms) commit transaction Completed 200 OK in 133ms (Views: 0.5ms | ActiveRecord: 126.5ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 07:15:36 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744536.13208.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:15:38 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"6G7y5ySTvVSUO4hncoW5e973bloUSHaVSPEtmAx5nA0=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 88ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (96.0ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 07:15:40 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 16ms (Views: 13.1ms | ActiveRecord: 0.6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:15:40 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:15:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"Q31WbOtUG2Qmh6qKKkWFhVmrd+T/VYao9E65AVn46yU=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744540.68424.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (110.2ms) commit transaction Completed 200 OK in 117ms (Views: 0.5ms | ActiveRecord: 110.7ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:15:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744540.68424.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:15:42 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"Q31WbOtUG2Qmh6qKKkWFhVmrd+T/VYao9E65AVn46yU=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (104.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 133ms (Views: 8.5ms | ActiveRecord: 105.8ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:15:42 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:15:42 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744540.68424.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:15:43 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"Q31WbOtUG2Qmh6qKKkWFhVmrd+T/VYao9E65AVn46yU=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744543.29535.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (114.0ms) commit transaction Completed 200 OK in 121ms (Views: 0.6ms | ActiveRecord: 114.4ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:15:43 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744543.29535.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:15:45 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"Q31WbOtUG2Qmh6qKKkWFhVmrd+T/VYao9E65AVn46yU=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.6ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (114.9ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Document Load (1.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 148ms (Views: 14.1ms | ActiveRecord: 118.1ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:15:45 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:15:45 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744543.29535.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (117.5ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 07:15:45 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:15:45 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:15:46 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"d6dewPInF15eeNUSgh2JZV/vQ3Bdi12ClP8/8Qv6kOQ=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744546.16477.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (131.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70103694343480 LIMIT 1  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 223ms (Views: 69.5ms | ActiveRecord: 132.3ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:15:48 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"d6dewPInF15eeNUSgh2JZV/vQ3Bdi12ClP8/8Qv6kOQ=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744548.27125.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (210.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70103697076860 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 223ms (Views: 0.5ms | ActiveRecord: 211.3ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (152.3ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.0ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (90.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (75.4ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (121.6ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:18:15 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (60.0ms) Completed 200 OK in 195ms (Views: 188.3ms | ActiveRecord: 1.4ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:18:15 +0400 2012 Served asset /attachments.js - 200 OK (5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:18:15 +0400 2012 Compiled attachments.css (2ms) (pid 21371) Served asset /attachments.css - 200 OK (16ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:18:16 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:18:16 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:18:16 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"NrQuJFURuhI6xVdvozCIq04ILG41k8fKBQarxHwhlLY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (19.8ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744696.43953.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (131.7ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 253ms (Views: 1.9ms | ActiveRecord: 151.7ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 07:18:16 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744696.43953.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (220.0ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 07:18:18 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:18:18 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"gAiXmWQ9QZHoOiFShkuCxAfR2G00bnf1qcM5qNP8eFk=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744698.95043.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (144.0ms) commit transaction Completed 200 OK in 152ms (Views: 0.5ms | ActiveRecord: 144.6ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 07:18:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744698.95043.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:18:21 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"gAiXmWQ9QZHoOiFShkuCxAfR2G00bnf1qcM5qNP8eFk=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 90ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (85.4ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 07:18:23 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 19ms (Views: 15.8ms | ActiveRecord: 0.8ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:18:23 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:18:23 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"CzLHgY0uZB8k1LkdI0TbUKN6U4qiYZeDOQnrBRYx3Kg=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744703.71148.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (108.3ms) commit transaction Completed 200 OK in 116ms (Views: 0.5ms | ActiveRecord: 109.1ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:18:23 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744703.71148.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:18:25 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"CzLHgY0uZB8k1LkdI0TbUKN6U4qiYZeDOQnrBRYx3Kg=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (98.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 123ms (Views: 8.9ms | ActiveRecord: 100.2ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:18:25 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:18:25 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744703.71148.sample.jpg (0.2ms) Completed 200 OK in 12ms (ActiveRecord: 0.3ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:18:26 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"CzLHgY0uZB8k1LkdI0TbUKN6U4qiYZeDOQnrBRYx3Kg=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744706.28901.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (112.9ms) commit transaction Completed 200 OK in 119ms (Views: 0.6ms | ActiveRecord: 113.3ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:18:26 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744706.28901.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:18:28 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"CzLHgY0uZB8k1LkdI0TbUKN6U4qiYZeDOQnrBRYx3Kg=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.5ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (107.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 134ms (Views: 9.1ms | ActiveRecord: 109.7ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:18:28 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:18:28 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744706.28901.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (102.1ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 07:18:28 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 0.5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:18:28 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:18:29 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"fM0EvrfPYcC+MNAAJZD69SvnsrOIc3PxG2oCAosHjp0=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744709.13158.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (123.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70202190335360 LIMIT 1  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 228ms (Views: 1.8ms | ActiveRecord: 124.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:18:31 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"fM0EvrfPYcC+MNAAJZD69SvnsrOIc3PxG2oCAosHjp0=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.4ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744711.24284.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (113.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70202192936900 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 128ms (Views: 0.5ms | ActiveRecord: 114.8ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 07:18:33 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"fM0EvrfPYcC+MNAAJZD69SvnsrOIc3PxG2oCAosHjp0=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (121.1ms) commit transaction Completed 200 OK in 142ms (Views: 0.8ms | ActiveRecord: 122.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:18:33 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"fM0EvrfPYcC+MNAAJZD69SvnsrOIc3PxG2oCAosHjp0=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744713.6281.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (110.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70202191375760 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 121ms (Views: 0.5ms | ActiveRecord: 111.6ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (143.6ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (110.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (111.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (69.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (428.6ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 07:19:41 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (65.4ms) Completed 200 OK in 204ms (Views: 199.2ms | ActiveRecord: 1.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 07:19:42 +0400 2012 Served asset /attachments.js - 200 OK (6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:19:42 +0400 2012 Served asset /attachments.css - 200 OK (10ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:19:42 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 07:19:42 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:19:42 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"UDwBr6Ji6AzdLu2RiooYm6QXYmwRCcr5c9JZo6SW35E=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (21.0ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744782.91673.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (124.3ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 250ms (Views: 1.9ms | ActiveRecord: 145.5ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 07:19:43 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744782.91673.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (115.0ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 07:19:44 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.6ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 17ms (Views: 13.2ms | ActiveRecord: 1.0ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:19:45 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"3wX8fJHw6iXaO071pmowRHs7g/84Te9575FRwQSUoGg=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744785.53684.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (130.8ms) commit transaction Completed 200 OK in 147ms (Views: 0.6ms | ActiveRecord: 131.2ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 07:19:45 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744785.53684.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:19:47 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"3wX8fJHw6iXaO071pmowRHs7g/84Te9575FRwQSUoGg=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 0.5ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.5ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 07:19:49 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 22ms (Views: 14.4ms | ActiveRecord: 0.8ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:19:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"PuupMQsizCI6uVMgTMRiHC4im4bzbf0roqh416uzKj4=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744790.24672.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (168.2ms) commit transaction Completed 200 OK in 175ms (Views: 0.5ms | ActiveRecord: 168.6ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:19:50 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744790.24672.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.4ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:19:52 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"PuupMQsizCI6uVMgTMRiHC4im4bzbf0roqh416uzKj4=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (100.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 125ms (Views: 8.6ms | ActiveRecord: 101.8ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 07:19:52 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744790.24672.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 07:19:52 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"PuupMQsizCI6uVMgTMRiHC4im4bzbf0roqh416uzKj4=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330744792.74599.sample.jpg"], ["filesize", 9022], ["mimetype", "image/jpeg"], ["user_id", nil]]  (105.4ms) commit transaction Completed 200 OK in 112ms (Views: 0.5ms | ActiveRecord: 105.8ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:19:52 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744792.74599.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 07:19:54 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"PuupMQsizCI6uVMgTMRiHC4im4bzbf0roqh416uzKj4=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (2.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (69.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 96ms (Views: 11.7ms | ActiveRecord: 73.3ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:19:55 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 07:19:55 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330744792.74599.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (93.9ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 07:19:55 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 0.5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 07:19:55 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:19:55 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"Rdbde8WKO5wprzewsjt0K0VSXI9EloVRpdFahCGnKBc=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744795.67094.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (112.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69904447415320 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 142ms (Views: 0.9ms | ActiveRecord: 113.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:19:57 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"Rdbde8WKO5wprzewsjt0K0VSXI9EloVRpdFahCGnKBc=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.3ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744797.90608.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (112.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69904450962780 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 125ms (Views: 0.6ms | ActiveRecord: 113.8ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 07:20:00 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"Rdbde8WKO5wprzewsjt0K0VSXI9EloVRpdFahCGnKBc=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (116.8ms) commit transaction Completed 200 OK in 202ms (Views: 3.5ms | ActiveRecord: 117.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 07:20:00 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"Rdbde8WKO5wprzewsjt0K0VSXI9EloVRpdFahCGnKBc=", "container_id"=>"4", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330744800.55736.sample.pdf"], ["filesize", 8731], ["mimetype", "application/pdf"], ["user_id", nil]]  (108.9ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69904448718840 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 123ms (Views: 0.7ms | ActiveRecord: 110.2ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 4  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (151.4ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.4ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (89.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (89.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (55.5ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (150.7ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.3ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (67.7ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (138.4ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (64.7ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (121.6ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.3ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (89.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (111.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (96.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (135.1ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (64.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (122.9ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 14:42:24 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (66.7ms) Completed 200 OK in 219ms (Views: 209.5ms | ActiveRecord: 2.3ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 14:42:25 +0400 2012 Served asset /attachments.js - 200 OK (22ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 14:42:25 +0400 2012 Served asset /attachments.css - 200 OK (7ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 14:42:25 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 14:42:25 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:26 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"8RUgJ/V9y3NQW4VQjUqBdQyWWRjFuEf5nuT1J41+okc=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (19.1ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771346.02701.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (116.8ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 264ms (Views: 3.0ms | ActiveRecord: 136.1ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 14:42:26 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771346.02701.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (114.4ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 14:42:28 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:28 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"9VGVVxAJ1zs2hxk+qwOeSSkZmf0PMkrsTtWTNs3lD0g=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771348.43162.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (120.9ms) commit transaction Completed 200 OK in 128ms (Views: 0.5ms | ActiveRecord: 121.4ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 14:42:28 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771348.43162.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:30 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"9VGVVxAJ1zs2hxk+qwOeSSkZmf0PMkrsTtWTNs3lD0g=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (101.9ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 14:42:32 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 13ms (Views: 10.6ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:33 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"uPr5yVrzLfeNuQIFvE6DjZSOPyOr5VvDUnx1TYnPlUM=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771353.23972.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (93.8ms) commit transaction Completed 200 OK in 101ms (Views: 0.5ms | ActiveRecord: 94.3ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 14:42:33 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771353.23972.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 14:42:35 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"uPr5yVrzLfeNuQIFvE6DjZSOPyOr5VvDUnx1TYnPlUM=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (120.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 149ms (Views: 11.2ms | ActiveRecord: 122.3ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 14:42:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771353.23972.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:35 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"uPr5yVrzLfeNuQIFvE6DjZSOPyOr5VvDUnx1TYnPlUM=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.3ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771355.74881.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (127.2ms) commit transaction Completed 200 OK in 138ms (Views: 0.5ms | ActiveRecord: 128.0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 14:42:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771355.74881.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 14:42:37 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"uPr5yVrzLfeNuQIFvE6DjZSOPyOr5VvDUnx1TYnPlUM=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.3ms) begin transaction Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (12.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (107.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 239ms (Views: 13.0ms | ActiveRecord: 122.3ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 14:42:38 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771355.74881.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (104.5ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 14:42:38 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 0.5ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (119.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (76.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (76.1ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:38 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"wfm6CP8oAbFiNhx3MRlALWsiMT1Eq6Z0Gu1Y0Kz//44=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771358.91882.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (86.7ms) commit transaction Completed 200 OK in 102ms (Views: 0.6ms | ActiveRecord: 87.2ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 14:42:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771358.91882.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:39 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"wfm6CP8oAbFiNhx3MRlALWsiMT1Eq6Z0Gu1Y0Kz//44=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771359.23929.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (118.7ms) commit transaction Completed 200 OK in 140ms (Views: 0.8ms | ActiveRecord: 119.1ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 14:42:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771359.23929.sample.jpg (0.2ms) Completed 200 OK in 6ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:39 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"wfm6CP8oAbFiNhx3MRlALWsiMT1Eq6Z0Gu1Y0Kz//44=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771359.70574.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (120.6ms) commit transaction Completed 200 OK in 149ms (Views: 0.6ms | ActiveRecord: 120.9ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 14:42:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771359.70574.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:42:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"wfm6CP8oAbFiNhx3MRlALWsiMT1Eq6Z0Gu1Y0Kz//44=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330771360.07645.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (128.8ms) commit transaction Completed 200 OK in 137ms (Views: 0.5ms | ActiveRecord: 129.2ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 14:42:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771360.07645.sample.png (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.1ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 14:42:42 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"wfm6CP8oAbFiNhx3MRlALWsiMT1Eq6Z0Gu1Y0Kz//44=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"8"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 8 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 4 WHERE "avatars"."id" = 8  (103.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 126ms (Views: 8.4ms | ActiveRecord: 104.5ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 14:42:42 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771360.07645.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms)  (0.2ms) SELECT COUNT(*) FROM "avatars"   (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (72.8ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 14:42:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 0.6ms) Document Load (0.2ms) SELECT "documents".* FROM "documents" Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:42:42 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"FwRHVP7W5mqZXuHvoGLM8AMcWINPfktrgA9+TKdwC20=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771362.73183.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (117.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (15.6ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70098297887580 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 225ms (Views: 1.0ms | ActiveRecord: 133.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:42:44 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"FwRHVP7W5mqZXuHvoGLM8AMcWINPfktrgA9+TKdwC20=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771364.83802.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (137.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70098300725880 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 149ms (Views: 0.5ms | ActiveRecord: 137.9ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 14:42:46 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"FwRHVP7W5mqZXuHvoGLM8AMcWINPfktrgA9+TKdwC20=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (100.3ms) commit transaction Completed 200 OK in 120ms (Views: 0.7ms | ActiveRecord: 101.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:42:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"FwRHVP7W5mqZXuHvoGLM8AMcWINPfktrgA9+TKdwC20=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771367.18498.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (125.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70098298919960 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 136ms (Views: 0.5ms | ActiveRecord: 126.0ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (137.6ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (89.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (83.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (191.3ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 14:45:00 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (67.9ms) Completed 200 OK in 238ms (Views: 227.7ms | ActiveRecord: 2.2ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 14:45:00 +0400 2012 Served asset /attachments.js - 200 OK (7ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 14:45:00 +0400 2012 Served asset /attachments.css - 200 OK (4ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 14:45:01 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 14:45:01 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:01 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"BBxn4YPBO2n08S85lBx/Cxu51sOLpk1fJygx+mY+JnA=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (23.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771501.52068.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (112.8ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 257ms (Views: 2.5ms | ActiveRecord: 136.1ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 14:45:01 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771501.52068.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (109.9ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 14:45:03 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 22ms (Views: 13.6ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:04 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u7h7xYBvyXaGGMkL7jWM9tjpw+kG011j45JjEI4HRAs=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771504.04064.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (97.0ms) commit transaction Completed 200 OK in 117ms (Views: 0.5ms | ActiveRecord: 97.4ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 14:45:04 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771504.04064.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:06 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u7h7xYBvyXaGGMkL7jWM9tjpw+kG011j45JjEI4HRAs=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (97.8ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 14:45:08 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 15ms (Views: 12.1ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:08 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"UubKozvur8TevSePipyD34bfjYHaETQQJCOle89DDOI=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771508.6653.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (96.3ms) commit transaction Completed 200 OK in 107ms (Views: 0.5ms | ActiveRecord: 96.8ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 14:45:08 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771508.6653.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 14:45:10 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"UubKozvur8TevSePipyD34bfjYHaETQQJCOle89DDOI=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (67.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 102ms (Views: 11.3ms | ActiveRecord: 69.1ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 14:45:10 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771508.6653.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:11 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"UubKozvur8TevSePipyD34bfjYHaETQQJCOle89DDOI=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771511.12181.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (100.4ms) commit transaction Completed 200 OK in 107ms (Views: 0.5ms | ActiveRecord: 100.8ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 14:45:11 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771511.12181.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 14:45:13 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"UubKozvur8TevSePipyD34bfjYHaETQQJCOle89DDOI=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (111.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 244ms (Views: 13.4ms | ActiveRecord: 113.0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 14:45:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771511.12181.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (132.2ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 14:45:13 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.6ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (99.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (76.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (87.2ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:14 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"uOhCFZLh6XsrcZo/HeGNudivJojE82lptULdx5baVeY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771514.28703.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (128.4ms) commit transaction Completed 200 OK in 143ms (Views: 0.8ms | ActiveRecord: 128.9ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 14:45:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771514.28703.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:14 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"uOhCFZLh6XsrcZo/HeGNudivJojE82lptULdx5baVeY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771514.66497.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (110.0ms) commit transaction Completed 200 OK in 144ms (Views: 0.6ms | ActiveRecord: 110.4ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 14:45:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771514.66497.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:15 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"uOhCFZLh6XsrcZo/HeGNudivJojE82lptULdx5baVeY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330771515.12563.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (356.1ms) commit transaction Completed 200 OK in 382ms (Views: 0.7ms | ActiveRecord: 356.4ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 14:45:15 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (2.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771515.12563.sample.jpg (0.2ms) Completed 200 OK in 6ms (ActiveRecord: 2.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 14:45:15 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"uOhCFZLh6XsrcZo/HeGNudivJojE82lptULdx5baVeY=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330771515.72515.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (112.4ms) commit transaction Completed 200 OK in 119ms (Views: 0.5ms | ActiveRecord: 112.9ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 14:45:15 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771515.72515.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 14:45:17 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"uOhCFZLh6XsrcZo/HeGNudivJojE82lptULdx5baVeY=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"8"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 8 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 4 WHERE "avatars"."id" = 8  (95.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 118ms (Views: 8.5ms | ActiveRecord: 97.0ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 14:45:17 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330771515.72515.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (122.9ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 14:45:18 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 13ms (Views: 11.4ms | ActiveRecord: 0.5ms) Document Load (0.2ms) SELECT "documents".* FROM "documents" Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:18 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771518.44005.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (91.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958070103880 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 232ms (Views: 1.1ms | ActiveRecord: 92.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:18 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771518.81526.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (81.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958072949060 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 120ms (Views: 0.6ms | ActiveRecord: 82.1ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:19 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771519.05681.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (72.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958071566260 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 110ms (Views: 0.6ms | ActiveRecord: 73.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:19 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771519.30014.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (85.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958070824120 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 124ms (Views: 0.6ms | ActiveRecord: 86.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:19 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771519.55784.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (83.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958070251620 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 119ms (Views: 0.5ms | ActiveRecord: 84.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:19 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771519.89044.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (72.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958070673960 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 88ms (Views: 0.5ms | ActiveRecord: 73.5ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 14:45:21 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "id"=>"1"} Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (111.9ms) commit transaction Completed 200 OK in 142ms (Views: 0.8ms | ActiveRecord: 112.8ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 14:45:22 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "id"=>"2"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (65.1ms) commit transaction Completed 200 OK in 79ms (Views: 0.6ms | ActiveRecord: 65.7ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 14:45:22 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (97.5ms) commit transaction Completed 200 OK in 112ms (Views: 0.5ms | ActiveRecord: 98.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:22 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771522.50763.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (79.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958071051020 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 117ms (Views: 0.6ms | ActiveRecord: 80.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 14:45:22 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"bpkK5AOpw1VUbnZhYMMbyZMzZsf+Nf3Z9zdqpCHMoXM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330771522.75458.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (76.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69958070511600 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 86ms (Views: 0.4ms | ActiveRecord: 77.1ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (151.1ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.3ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (57.9ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (103.1ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 15:53:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (174.8ms) Completed 200 OK in 210ms (Views: 199.3ms | ActiveRecord: 1.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 15:53:42 +0400 2012 Served asset /attachments.js - 200 OK (7ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 15:53:42 +0400 2012 Served asset /attachments.css - 200 OK (5ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 15:53:42 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 15:53:42 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:43 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (28.1ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775623.31419.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (109.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952859692020 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 4066ms (Views: 25.1ms | ActiveRecord: 137.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775627.45682.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (138.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952860094940 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 265ms (Views: 6.6ms | ActiveRecord: 139.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775627.74222.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (76.4ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952858833260 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 145ms (Views: 1.1ms | ActiveRecord: 77.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775627.9105.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (184.5ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952858297060 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 235ms (Views: 0.6ms | ActiveRecord: 185.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:48 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775628.40671.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (76.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952862380580 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 148ms (Views: 0.9ms | ActiveRecord: 77.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:48 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775628.68645.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (65.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952859250100 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 100ms (Views: 0.6ms | ActiveRecord: 66.3ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 15:53:50 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.7ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (103.5ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 148ms (Views: 16.7ms | ActiveRecord: 104.6ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 15:53:50 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "id"=>"2"} Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (79.6ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 105ms (Views: 6.9ms | ActiveRecord: 80.0ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 15:53:51 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (62.6ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 81ms (Views: 5.2ms | ActiveRecord: 63.3ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:51 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775631.48519.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (120.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952861843320 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 192ms (Views: 7.3ms | ActiveRecord: 121.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:53:51 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"8sp+6ufHI7Yt3LzIsddi/nYIqs/G2ZyWrFiTGNcArAY=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775631.9586.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (84.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 69952859124320 LIMIT 1  (0.1ms) begin transaction  (0.0ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 118ms (Views: 0.7ms | ActiveRecord: 85.6ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (142.6ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (90.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (56.1ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.4ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 15:54:35 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (160.4ms) Completed 200 OK in 186ms (Views: 178.9ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 15:54:35 +0400 2012 Served asset /attachments.js - 200 OK (29ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 15:54:35 +0400 2012 Served asset /attachments.css - 200 OK (6ms) Document Load (0.3ms) SELECT "documents".* FROM "documents"  Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 15:54:36 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 15:54:36 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:54:36 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"RjdYw5nUFaN61EQiHFhqz2EAiXXlHeZyPc40P6YeBEQ=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (21.8ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775676.5146.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (90.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70135341387440 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 26659ms (Views: 3.1ms | ActiveRecord: 112.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:55:03 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"RjdYw5nUFaN61EQiHFhqz2EAiXXlHeZyPc40P6YeBEQ=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775703.20143.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (93.1ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70135343580260 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 1150ms (Views: 0.9ms | ActiveRecord: 94.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:55:04 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"RjdYw5nUFaN61EQiHFhqz2EAiXXlHeZyPc40P6YeBEQ=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775704.36145.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (112.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70135340932640 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 880ms (Views: 10.0ms | ActiveRecord: 113.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:55:05 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"RjdYw5nUFaN61EQiHFhqz2EAiXXlHeZyPc40P6YeBEQ=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775705.27831.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (107.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = 70135340127200 LIMIT 1  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 1360ms (Views: 0.9ms | ActiveRecord: 108.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 15:55:06 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"RjdYw5nUFaN61EQiHFhqz2EAiXXlHeZyPc40P6YeBEQ=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330775706.66539.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (109.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (135.3ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.4ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (111.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (111.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (73.0ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (55.3ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (55.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (120.4ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 16:16:25 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (185.7ms) Completed 200 OK in 219ms (Views: 208.1ms | ActiveRecord: 2.0ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 16:16:25 +0400 2012 Served asset /attachments.css - 200 OK (11ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 16:16:25 +0400 2012 Served asset /attachments.js - 200 OK (10ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:16:26 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:16:26 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (30.1ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776986.55896.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (120.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (76.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 427ms (Views: 14.0ms | ActiveRecord: 228.1ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:27 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.4ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776987.21442.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (119.2ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 2  (72.5ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 491ms (Views: 13.7ms | ActiveRecord: 193.3ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:27 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776987.75162.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (115.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 3  (72.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 289ms (Views: 5.6ms | ActiveRecord: 188.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776988.21579.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (118.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 4  (90.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 333ms (Views: 5.5ms | ActiveRecord: 209.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776988.69155.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (115.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 5  (69.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 313ms (Views: 4.9ms | ActiveRecord: 186.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:29 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776989.12114.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (111.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 6  (59.8ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 188ms (Views: 0.8ms | ActiveRecord: 172.4ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 16:16:31 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (98.5ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 140ms (Views: 20.0ms | ActiveRecord: 99.3ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 16:16:31 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "id"=>"2"} Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (100.8ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 138ms (Views: 7.0ms | ActiveRecord: 101.3ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 16:16:31 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "id"=>"3"} Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (98.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 157ms (Views: 8.1ms | ActiveRecord: 98.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:32 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776992.1201.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (77.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 7  (74.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 322ms (Views: 10.5ms | ActiveRecord: 152.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:16:32 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"1rcgXoo2tj7epJyXbgsaFAZl5ewvfPomxEBCpHRwDg0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330776992.57634.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (84.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 8  (72.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 179ms (Views: 0.8ms | ActiveRecord: 158.0ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (131.2ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (89.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (89.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (75.9ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (114.1ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 16:18:59 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (72.1ms) Completed 200 OK in 226ms (Views: 218.9ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 16:18:59 +0400 2012 Served asset /attachments.js - 200 OK (16ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 16:19:00 +0400 2012 Served asset /attachments.css - 200 OK (6ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:19:00 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:19:00 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:00 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"hosmj6vGYVX2hb7wDCIWQZzhhsMJRQY5QC6RJso6U4s=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (21.8ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777140.68739.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (84.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 215ms (Views: 2.6ms | ActiveRecord: 106.0ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 16:19:00 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777140.68739.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (111.0ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 16:19:02 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:03 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"D0+cDU5dJ+2sxD6RDzg9nvTRoitsf5aEgl0UgQquqyM=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777143.16229.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (132.9ms) commit transaction Completed 200 OK in 140ms (Views: 0.5ms | ActiveRecord: 133.5ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 16:19:03 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777143.16229.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:05 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"D0+cDU5dJ+2sxD6RDzg9nvTRoitsf5aEgl0UgQquqyM=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (127.9ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 16:19:07 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 13ms (Views: 11.1ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:07 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"snbp7VfWlmOcrhhpmuUNt5S+THTnyQDpld/+OkQtbmI=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777147.80345.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (98.5ms) commit transaction Completed 200 OK in 106ms (Views: 0.5ms | ActiveRecord: 99.1ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 16:19:07 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777147.80345.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 16:19:09 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"snbp7VfWlmOcrhhpmuUNt5S+THTnyQDpld/+OkQtbmI=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 6ms  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (103.8ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 16:19:12 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 12ms (Views: 9.6ms | ActiveRecord: 0.5ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (78.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (65.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (64.9ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:12 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DgWMIINhywDOQm0wugpdeu+f2KnDlyd0ggn9ReSVxM0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777152.6597.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (75.0ms) commit transaction Completed 200 OK in 96ms (Views: 0.6ms | ActiveRecord: 75.6ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 16:19:12 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777152.6597.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:12 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DgWMIINhywDOQm0wugpdeu+f2KnDlyd0ggn9ReSVxM0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777153.00459.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (75.9ms) commit transaction Completed 200 OK in 110ms (Views: 0.5ms | ActiveRecord: 76.3ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 16:19:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777153.00459.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:13 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DgWMIINhywDOQm0wugpdeu+f2KnDlyd0ggn9ReSVxM0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777153.45871.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (115.3ms) commit transaction Completed 200 OK in 149ms (Views: 0.6ms | ActiveRecord: 115.8ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 16:19:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777153.45871.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:19:13 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DgWMIINhywDOQm0wugpdeu+f2KnDlyd0ggn9ReSVxM0=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330777153.86376.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (96.4ms) commit transaction Completed 200 OK in 105ms (Views: 0.5ms | ActiveRecord: 97.0ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 16:19:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777153.86376.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 16:19:16 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"DgWMIINhywDOQm0wugpdeu+f2KnDlyd0ggn9ReSVxM0=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"7"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 10ms  (0.2ms) SELECT COUNT(*) FROM "avatars"  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (120.0ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 16:19:16 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 13ms (Views: 10.9ms | ActiveRecord: 0.6ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:16 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777156.5997.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (95.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 1  (75.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 325ms (Views: 1.4ms | ActiveRecord: 172.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:17 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777157.0818.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (91.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 2  (82.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 268ms (Views: 0.7ms | ActiveRecord: 175.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:17 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777157.48552.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (74.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 3  (69.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 225ms (Views: 0.6ms | ActiveRecord: 145.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:17 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777157.91465.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (73.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 4  (79.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 242ms (Views: 0.6ms | ActiveRecord: 153.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:18 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777158.23816.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (137.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 5  (78.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 255ms (Views: 0.6ms | ActiveRecord: 216.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:18 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777158.74465.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (74.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 6  (72.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 159ms (Views: 0.5ms | ActiveRecord: 148.0ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 16:19:20 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (261.4ms) commit transaction Completed 200 OK in 278ms (Views: 0.6ms | ActiveRecord: 262.4ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 16:19:21 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "id"=>"2"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (79.8ms) commit transaction Completed 200 OK in 94ms (Views: 0.6ms | ActiveRecord: 80.6ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 16:19:21 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (76.6ms) commit transaction Completed 200 OK in 93ms (Views: 0.6ms | ActiveRecord: 77.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:21 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777161.59586.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (77.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 7  (62.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 212ms (Views: 0.7ms | ActiveRecord: 141.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:19:21 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"MutUk6TIIhTarrujFNPdTXD33A0ZIlUtoez5my2pqdM=", "container_id"=>"5", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777161.93334.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (79.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 5 WHERE "documents"."id" = 8  (61.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 162ms (Views: 0.6ms | ActiveRecord: 142.4ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (130.8ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (61.8ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.0ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 16:30:20 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (63.6ms) Completed 200 OK in 208ms (Views: 196.3ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 16:30:21 +0400 2012 Served asset /attachments.js - 200 OK (18ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 16:30:21 +0400 2012 Served asset /attachments.css - 200 OK (6ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:30:21 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:30:21 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:21 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"sOXopTtQrJgfqCoiMeglKFwvgxmGhctFuTM6KJxiESw=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (19.8ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777821.64678.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (117.0ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 240ms (Views: 1.9ms | ActiveRecord: 137.0ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 16:30:21 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777821.64678.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.4ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (105.7ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 16:30:23 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:24 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"52E7lEytkETvx1YrxdWE3qz5JJr816xRzn6n0okop7o=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777824.26983.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (194.7ms) commit transaction Completed 200 OK in 201ms (Views: 0.5ms | ActiveRecord: 195.1ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 16:30:24 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777824.26983.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:26 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"52E7lEytkETvx1YrxdWE3qz5JJr816xRzn6n0okop7o=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (11.9ms) INSERT INTO "users" VALUES(NULL)  (124.7ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 16:30:28 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 14ms (Views: 11.1ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:28 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"bR1omw+7KNl04DUYsf/gSC/8vAGgilDvyGwOz33Zo3Y=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777828.90211.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (119.9ms) commit transaction Completed 200 OK in 128ms (Views: 0.6ms | ActiveRecord: 120.4ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 16:30:29 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777828.90211.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 16:30:30 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"bR1omw+7KNl04DUYsf/gSC/8vAGgilDvyGwOz33Zo3Y=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 8ms  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (112.3ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 16:30:33 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (1.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 15ms (Views: 11.8ms | ActiveRecord: 1.4ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (129.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (96.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (76.0ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:33 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777833.73591.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (70.5ms) commit transaction Completed 200 OK in 85ms (Views: 0.6ms | ActiveRecord: 71.0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 16:30:33 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777833.73591.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:34 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777834.05449.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (95.7ms) commit transaction Completed 200 OK in 113ms (Views: 0.6ms | ActiveRecord: 96.2ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 16:30:34 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777834.05449.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:34 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777834.50661.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (132.2ms) commit transaction Completed 200 OK in 148ms (Views: 0.7ms | ActiveRecord: 132.7ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 16:30:34 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777834.50661.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:34 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777834.87967.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (81.9ms) commit transaction Completed 200 OK in 97ms (Views: 0.6ms | ActiveRecord: 82.4ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 16:30:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777834.87967.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:35 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777835.22949.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (81.6ms) commit transaction Completed 200 OK in 105ms (Views: 1.7ms | ActiveRecord: 82.0ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 16:30:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777835.22949.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:35 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330777835.55546.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (72.8ms) commit transaction Completed 200 OK in 79ms (Views: 0.4ms | ActiveRecord: 73.2ms) Started GET "/avatars/9" for 127.0.0.1 at Sat Mar 03 16:30:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777835.55546.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 16:30:37 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"tdyUJXp/GN3IEiv5LYrjQXIWv1277Ddz1t8hkazSUrQ=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"9"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.5ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 4ms Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (103.4ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 16:30:37 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 14ms (Views: 11.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:38 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"UgQ8nksfJwdv/tufRu9zVXWanXdhhtn3Wtt+lOCch8A=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (110.6ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sat Mar 03 16:30:40 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:30:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"FB6XYtAM+gKfLhb1v3bZ7rNkfaaPL2/IE20uboBY2NM=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330777840.54959.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (70.6ms) commit transaction Completed 200 OK in 77ms (Views: 0.5ms | ActiveRecord: 71.1ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 16:30:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330777840.54959.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (73.4ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sat Mar 03 16:30:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:42 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777843.02496.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (160.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 1  (75.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 311ms (Views: 2.8ms | ActiveRecord: 236.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:43 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777843.42957.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (139.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 2  (72.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 252ms (Views: 0.6ms | ActiveRecord: 213.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:43 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777843.81364.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (132.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 3  (75.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 248ms (Views: 1.3ms | ActiveRecord: 208.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:44 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777844.18911.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (79.6ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 4  (75.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 193ms (Views: 0.5ms | ActiveRecord: 156.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:44 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777844.58364.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (140.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 5  (71.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 263ms (Views: 0.6ms | ActiveRecord: 213.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:44 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777844.96998.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (75.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 6  (73.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 161ms (Views: 0.5ms | ActiveRecord: 149.5ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 16:30:47 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (85.5ms) commit transaction Completed 200 OK in 114ms (Views: 0.8ms | ActiveRecord: 86.2ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 16:30:47 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "id"=>"2"} Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (69.4ms) commit transaction Completed 200 OK in 81ms (Views: 0.5ms | ActiveRecord: 69.9ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 16:30:47 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (81.1ms) commit transaction Completed 200 OK in 95ms (Views: 0.6ms | ActiveRecord: 81.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777847.62838.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (75.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 7  (63.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 180ms (Views: 0.6ms | ActiveRecord: 140.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:30:48 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"cDtJAZm88b788GMVO+uGhAywSVpH+wG687+CzSuDkPc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330777848.0192.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (73.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 8  (61.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 147ms (Views: 0.5ms | ActiveRecord: 136.4ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 7  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (114.7ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.4ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (64.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (414.8ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 16:49:26 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (60.6ms) Completed 200 OK in 206ms (Views: 196.6ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 16:49:26 +0400 2012 Served asset /attachments.js - 200 OK (6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 16:49:26 +0400 2012 Served asset /attachments.css - 200 OK (5ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:49:27 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:49:27 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:27 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"Z9PaZ+s5uwfUtaZu+IY/v4amWl9UoqUADfFuFFDjG0M=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (19.8ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778967.40608.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (118.5ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 241ms (Views: 1.9ms | ActiveRecord: 138.5ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 16:49:27 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778967.40608.sample.jpg (0.3ms) Completed 200 OK in 5ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.3ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (117.9ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 16:49:29 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:30 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"gqKRx3Lb0t1vqpwzHjAEgsfVM/ihVKlXJ9aKz+ui5Tk=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778970.01866.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (129.7ms) commit transaction Completed 200 OK in 136ms (Views: 0.5ms | ActiveRecord: 130.2ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 16:49:30 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778970.01866.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:32 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"gqKRx3Lb0t1vqpwzHjAEgsfVM/ihVKlXJ9aKz+ui5Tk=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (11.3ms) INSERT INTO "users" VALUES(NULL)  (113.3ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 16:49:34 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 16ms (Views: 13.6ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:34 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"OpCZ4tUTQSUL/TyAOUvdU51qR0QkfPI0ClFKHPk9X9U=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778974.63254.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (85.3ms) commit transaction Completed 200 OK in 92ms (Views: 0.5ms | ActiveRecord: 85.8ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 16:49:34 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778974.63254.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 16:49:36 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"OpCZ4tUTQSUL/TyAOUvdU51qR0QkfPI0ClFKHPk9X9U=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 5ms  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (114.0ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 16:49:38 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.5ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (135.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (92.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (75.9ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:39 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778979.41703.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (73.2ms) commit transaction Completed 200 OK in 87ms (Views: 0.5ms | ActiveRecord: 73.7ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 16:49:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778979.41703.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:39 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (7.6ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778979.74093.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (73.0ms) commit transaction Completed 200 OK in 104ms (Views: 0.5ms | ActiveRecord: 80.7ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 16:49:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778979.74093.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (1.6ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778980.16769.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (110.4ms) commit transaction Completed 200 OK in 148ms (Views: 0.6ms | ActiveRecord: 112.1ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 16:49:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778980.16769.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778980.54831.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (96.6ms) commit transaction Completed 200 OK in 136ms (Views: 0.6ms | ActiveRecord: 97.1ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 16:49:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778980.54831.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778980.91033.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (80.3ms) commit transaction Completed 200 OK in 97ms (Views: 0.6ms | ActiveRecord: 80.7ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 16:49:41 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778980.91033.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:41 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330778981.23582.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (76.2ms) commit transaction Completed 200 OK in 82ms (Views: 0.4ms | ActiveRecord: 76.6ms) Started GET "/avatars/9" for 127.0.0.1 at Sat Mar 03 16:49:41 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778981.23582.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 16:49:43 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"mGHHtOLihnGgZ96ao47gjYVvtjMr+Ks0oORH+cSY9p0=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"9"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 4ms Avatar Load (1.7ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (101.0ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 16:49:43 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 14ms (Views: 11.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:43 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DnEtCV481mCpHaSL+GQTM1qPyXP5xeGcvPnMU9K8vZk=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5 Document Load (0.3ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (247.7ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sat Mar 03 16:49:46 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 18ms (Views: 14.6ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:49:46 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"BEBMPOEIznmMCiAxkQGAbTf4RIgi2Em4y3enCPEaaVI=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330778986.50795.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (119.5ms) commit transaction Completed 200 OK in 136ms (Views: 0.5ms | ActiveRecord: 120.0ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 16:49:46 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330778986.50795.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (1.0ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (113.7ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sat Mar 03 16:49:48 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 12ms (Views: 9.6ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:49:49 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"yyU5J03jgX3CHNhXex++ebhh2G1iU8FBhhUbsSq97vQ=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (7.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330778989.07307.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (117.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 1  (77.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 311ms (Views: 1.2ms | ActiveRecord: 203.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:49:49 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"yyU5J03jgX3CHNhXex++ebhh2G1iU8FBhhUbsSq97vQ=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330778989.59241.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (128.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 2  (78.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 272ms (Views: 0.6ms | ActiveRecord: 207.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:49:50 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"yyU5J03jgX3CHNhXex++ebhh2G1iU8FBhhUbsSq97vQ=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (2.2ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330778990.06415.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (112.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 3  (71.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 266ms (Views: 0.5ms | ActiveRecord: 186.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:49:50 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"yyU5J03jgX3CHNhXex++ebhh2G1iU8FBhhUbsSq97vQ=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330778990.44233.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (121.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 4  (68.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 260ms (Views: 0.6ms | ActiveRecord: 190.5ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (128.4ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (80.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (92.9ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 16:52:00 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (168.9ms) Completed 200 OK in 204ms (Views: 192.5ms | ActiveRecord: 1.9ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 16:52:00 +0400 2012 Served asset /attachments.js - 200 OK (26ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 16:52:00 +0400 2012 Served asset /attachments.css - 200 OK (8ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:52:01 +0400 2012 ActionController::RoutingError (No route matches [GET] "/favicon.ico"): actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.1) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/static.rb:53:in `call' railties (3.2.1) lib/rails/engine.rb:479:in `call' railties (3.2.1) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/builder.rb:134:in `call' rack (1.4.1) lib/rack/urlmap.rb:64:in `call' rack (1.4.1) lib/rack/urlmap.rb:49:in `each' rack (1.4.1) lib/rack/urlmap.rb:49:in `call' capybara (1.1.2) lib/capybara/server.rb:17:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' capybara (1.1.2) lib/capybara.rb:180:in `run_default_server' capybara (1.1.2) lib/capybara.rb:236 capybara (1.1.2) lib/capybara/server.rb:65:in `call' capybara (1.1.2) lib/capybara/server.rb:65:in `boot' capybara (1.1.2) lib/capybara/server.rb:64:in `initialize' capybara (1.1.2) lib/capybara/server.rb:64:in `new' capybara (1.1.2) lib/capybara/server.rb:64:in `boot' capybara (1.1.2) lib/capybara/selenium/driver.rb:32:in `initialize' capybara (1.1.2) lib/capybara.rb:251:in `new' capybara (1.1.2) lib/capybara.rb:251 capybara (1.1.2) lib/capybara/session.rb:61:in `call' capybara (1.1.2) lib/capybara/session.rb:61:in `driver' capybara (1.1.2) lib/capybara/session.rb:157:in `visit' capybara (1.1.2) lib/capybara/dsl.rb:161:in `visit' spec/avatar_spec.rb:10 rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `instance_eval' rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `run_in' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `each' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:368:in `run_hook' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `each' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:217:in `run_before_each' rspec-core (2.8.0) lib/rspec/core/example.rb:79:in `run' rspec-core (2.8.0) lib/rspec/core/example.rb:173:in `with_around_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:77:in `run' rspec-core (2.8.0) lib/rspec/core/example_group.rb:355:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `map' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:337:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `map' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/reporter.rb:34:in `report' rspec-core (2.8.0) lib/rspec/core/command_line.rb:25:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:80:in `run_in_process' rspec-core (2.8.0) lib/rspec/core/runner.rb:69:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:10:in `autorun' /usr/local/bin/rspec:19 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:52:01 +0400 2012 ActionController::RoutingError (No route matches [GET] "/favicon.ico"): actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.1) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/static.rb:53:in `call' railties (3.2.1) lib/rails/engine.rb:479:in `call' railties (3.2.1) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/builder.rb:134:in `call' rack (1.4.1) lib/rack/urlmap.rb:64:in `call' rack (1.4.1) lib/rack/urlmap.rb:49:in `each' rack (1.4.1) lib/rack/urlmap.rb:49:in `call' capybara (1.1.2) lib/capybara/server.rb:17:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' capybara (1.1.2) lib/capybara.rb:180:in `run_default_server' capybara (1.1.2) lib/capybara.rb:236 capybara (1.1.2) lib/capybara/server.rb:65:in `call' capybara (1.1.2) lib/capybara/server.rb:65:in `boot' capybara (1.1.2) lib/capybara/server.rb:64:in `initialize' capybara (1.1.2) lib/capybara/server.rb:64:in `new' capybara (1.1.2) lib/capybara/server.rb:64:in `boot' capybara (1.1.2) lib/capybara/selenium/driver.rb:32:in `initialize' capybara (1.1.2) lib/capybara.rb:251:in `new' capybara (1.1.2) lib/capybara.rb:251 capybara (1.1.2) lib/capybara/session.rb:61:in `call' capybara (1.1.2) lib/capybara/session.rb:61:in `driver' capybara (1.1.2) lib/capybara/session.rb:157:in `visit' capybara (1.1.2) lib/capybara/dsl.rb:161:in `visit' spec/avatar_spec.rb:10 rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `instance_eval' rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `run_in' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `each' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:368:in `run_hook' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `each' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:217:in `run_before_each' rspec-core (2.8.0) lib/rspec/core/example.rb:79:in `run' rspec-core (2.8.0) lib/rspec/core/example.rb:173:in `with_around_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:77:in `run' rspec-core (2.8.0) lib/rspec/core/example_group.rb:355:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `map' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:337:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `map' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/reporter.rb:34:in `report' rspec-core (2.8.0) lib/rspec/core/command_line.rb:25:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:80:in `run_in_process' rspec-core (2.8.0) lib/rspec/core/runner.rb:69:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:10:in `autorun' /usr/local/bin/rspec:19 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:01 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"zHGr5v/8tYIsLri2cridwvORrb8tHRUITje4XluVOhY=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (20.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779121.51864.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (114.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 154ms (Views: 3.1ms | ActiveRecord: 134.7ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 16:52:01 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779121.51864.sample.jpg (0.1ms) Completed 200 OK in 7ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (106.8ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 16:52:03 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 16ms (Views: 13.6ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:04 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pwqYn4BWKEVCcuMH671rcWW6c/A1He9v6Pe+Izb9Iqk=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779124.47103.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (119.6ms) commit transaction Completed 200 OK in 126ms (Views: 0.4ms | ActiveRecord: 120.0ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 16:52:04 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779124.47103.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:06 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pwqYn4BWKEVCcuMH671rcWW6c/A1He9v6Pe+Izb9Iqk=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 11ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (108.9ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 16:52:09 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:09 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"qQwBUv3hBLKz/NzsTvSh1Url0xi0h/wmEAJHcjUYads=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779129.5.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (116.9ms) commit transaction Completed 200 OK in 123ms (Views: 0.5ms | ActiveRecord: 117.2ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 16:52:09 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779129.5.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 16:52:11 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"qQwBUv3hBLKz/NzsTvSh1Url0xi0h/wmEAJHcjUYads=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 6ms ArgumentError (wrong number of arguments (3 for 2)): app/controllers/users_controller.rb:8:in `update'  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (120.6ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 16:52:13 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 14ms (Views: 11.8ms | ActiveRecord: 0.5ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (73.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (64.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (64.8ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:14 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779134.25647.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (119.0ms) commit transaction Completed 200 OK in 166ms (Views: 0.6ms | ActiveRecord: 119.4ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 16:52:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779134.25647.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:14 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779134.67957.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (116.7ms) commit transaction Completed 200 OK in 168ms (Views: 0.5ms | ActiveRecord: 117.3ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 16:52:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779134.67957.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:15 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779135.15349.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (109.3ms) commit transaction Completed 200 OK in 171ms (Views: 0.6ms | ActiveRecord: 109.8ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 16:52:15 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779135.15349.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.4ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:15 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779135.6793.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (135.0ms) commit transaction Completed 200 OK in 157ms (Views: 0.6ms | ActiveRecord: 135.4ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 16:52:15 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779135.6793.sample.jpg (0.1ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:16 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779136.14714.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (274.3ms) commit transaction Completed 200 OK in 335ms (Views: 0.5ms | ActiveRecord: 274.9ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 16:52:16 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779136.14714.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:16 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330779136.70598.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (104.3ms) commit transaction Completed 200 OK in 110ms (Views: 0.4ms | ActiveRecord: 104.7ms) Started GET "/avatars/9" for 127.0.0.1 at Sat Mar 03 16:52:16 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779136.70598.sample.png (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 16:52:18 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"pNHD9dRRNI6dEtq7/zIRko1Gp7Xkwk5iLjusW2lGL80=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"9"}} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 5ms ArgumentError (wrong number of arguments (3 for 2)): app/controllers/users_controller.rb:8:in `update' Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (101.2ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 16:52:18 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:19 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+JCz6MK7vzV8N9a8EaZgBNb/v+qJWqoF1OncIdlEZBI=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.2ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 9ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.3ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (110.4ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sat Mar 03 16:52:21 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 13ms (Views: 10.6ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:52:21 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"NY6eIAnw5XnOTlA6oEuPEYGl5IoikQBpS0KidExxlbo=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779141.75878.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (110.5ms) commit transaction Completed 200 OK in 117ms (Views: 0.5ms | ActiveRecord: 110.9ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 16:52:21 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779141.75878.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (102.1ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sat Mar 03 16:52:23 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 23ms (Views: 14.6ms | ActiveRecord: 0.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:24 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779144.27713.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (189.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 1  (78.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 375ms (Views: 1.7ms | ActiveRecord: 269.1ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:25 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779145.04045.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (131.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 2  (74.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 247ms (Views: 1.4ms | ActiveRecord: 206.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:25 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779145.42407.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (126.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 3  (72.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 245ms (Views: 0.5ms | ActiveRecord: 200.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:25 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779145.79811.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (114.4ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 4  (260.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 477ms (Views: 0.5ms | ActiveRecord: 375.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779146.40945.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (74.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 5  (91.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 203ms (Views: 0.6ms | ActiveRecord: 166.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779146.75038.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (79.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 6  (72.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 163ms (Views: 0.4ms | ActiveRecord: 152.4ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 16:52:29 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "id"=>"1"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.4ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (130.7ms) commit transaction Completed 200 OK in 167ms (Views: 1.3ms | ActiveRecord: 131.8ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 16:52:29 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "id"=>"2"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (78.3ms) commit transaction Completed 200 OK in 103ms (Views: 0.6ms | ActiveRecord: 78.9ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 16:52:29 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "id"=>"3"} Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (82.1ms) commit transaction Completed 200 OK in 98ms (Views: 0.5ms | ActiveRecord: 82.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:29 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779149.67101.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (84.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 7  (67.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 227ms (Views: 0.5ms | ActiveRecord: 153.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:52:30 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"UOj1Eb5Xj8ET1kNYZ9BICcSzk23O/P/6TjuLsX+jwqY=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779150.033.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (75.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 8  (84.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 184ms (Views: 0.6ms | ActiveRecord: 161.0ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 7  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (134.0ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.4ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (69.9ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (158.0ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (69.1ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (88.7ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (100.1ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 16:53:58 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (60.2ms) Completed 200 OK in 195ms (Views: 186.3ms | ActiveRecord: 1.9ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 16:53:59 +0400 2012 Served asset /attachments.js - 200 OK (7ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 16:53:59 +0400 2012 Served asset /attachments.css - 200 OK (4ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:53:59 +0400 2012 ActionController::RoutingError (No route matches [GET] "/favicon.ico"): actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.1) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/static.rb:53:in `call' railties (3.2.1) lib/rails/engine.rb:479:in `call' railties (3.2.1) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/builder.rb:134:in `call' rack (1.4.1) lib/rack/urlmap.rb:64:in `call' rack (1.4.1) lib/rack/urlmap.rb:49:in `each' rack (1.4.1) lib/rack/urlmap.rb:49:in `call' capybara (1.1.2) lib/capybara/server.rb:17:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' capybara (1.1.2) lib/capybara.rb:180:in `run_default_server' capybara (1.1.2) lib/capybara.rb:236 capybara (1.1.2) lib/capybara/server.rb:65:in `call' capybara (1.1.2) lib/capybara/server.rb:65:in `boot' capybara (1.1.2) lib/capybara/server.rb:64:in `initialize' capybara (1.1.2) lib/capybara/server.rb:64:in `new' capybara (1.1.2) lib/capybara/server.rb:64:in `boot' capybara (1.1.2) lib/capybara/selenium/driver.rb:32:in `initialize' capybara (1.1.2) lib/capybara.rb:251:in `new' capybara (1.1.2) lib/capybara.rb:251 capybara (1.1.2) lib/capybara/session.rb:61:in `call' capybara (1.1.2) lib/capybara/session.rb:61:in `driver' capybara (1.1.2) lib/capybara/session.rb:157:in `visit' capybara (1.1.2) lib/capybara/dsl.rb:161:in `visit' spec/avatar_spec.rb:10 rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `instance_eval' rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `run_in' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `each' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:368:in `run_hook' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `each' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:217:in `run_before_each' rspec-core (2.8.0) lib/rspec/core/example.rb:79:in `run' rspec-core (2.8.0) lib/rspec/core/example.rb:173:in `with_around_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:77:in `run' rspec-core (2.8.0) lib/rspec/core/example_group.rb:355:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `map' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:337:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `map' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/reporter.rb:34:in `report' rspec-core (2.8.0) lib/rspec/core/command_line.rb:25:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:80:in `run_in_process' rspec-core (2.8.0) lib/rspec/core/runner.rb:69:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:10:in `autorun' /usr/local/bin/rspec:19 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 16:53:59 +0400 2012 ActionController::RoutingError (No route matches [GET] "/favicon.ico"): actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.1) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.1) lib/action_dispatch/middleware/static.rb:53:in `call' railties (3.2.1) lib/rails/engine.rb:479:in `call' railties (3.2.1) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/builder.rb:134:in `call' rack (1.4.1) lib/rack/urlmap.rb:64:in `call' rack (1.4.1) lib/rack/urlmap.rb:49:in `each' rack (1.4.1) lib/rack/urlmap.rb:49:in `call' capybara (1.1.2) lib/capybara/server.rb:17:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' capybara (1.1.2) lib/capybara.rb:180:in `run_default_server' capybara (1.1.2) lib/capybara.rb:236 capybara (1.1.2) lib/capybara/server.rb:65:in `call' capybara (1.1.2) lib/capybara/server.rb:65:in `boot' capybara (1.1.2) lib/capybara/server.rb:64:in `initialize' capybara (1.1.2) lib/capybara/server.rb:64:in `new' capybara (1.1.2) lib/capybara/server.rb:64:in `boot' capybara (1.1.2) lib/capybara/selenium/driver.rb:32:in `initialize' capybara (1.1.2) lib/capybara.rb:251:in `new' capybara (1.1.2) lib/capybara.rb:251 capybara (1.1.2) lib/capybara/session.rb:61:in `call' capybara (1.1.2) lib/capybara/session.rb:61:in `driver' capybara (1.1.2) lib/capybara/session.rb:157:in `visit' capybara (1.1.2) lib/capybara/dsl.rb:161:in `visit' spec/avatar_spec.rb:10 rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `instance_eval' rspec-core (2.8.0) lib/rspec/core/hooks.rb:35:in `run_in' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `each' rspec-core (2.8.0) lib/rspec/core/hooks.rb:70:in `run_all' rspec-core (2.8.0) lib/rspec/core/hooks.rb:368:in `run_hook' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `each' rspec-core (2.8.0) lib/rspec/core/example_group.rb:292:in `run_before_each_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:217:in `run_before_each' rspec-core (2.8.0) lib/rspec/core/example.rb:79:in `run' rspec-core (2.8.0) lib/rspec/core/example.rb:173:in `with_around_hooks' rspec-core (2.8.0) lib/rspec/core/example.rb:77:in `run' rspec-core (2.8.0) lib/rspec/core/example_group.rb:355:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `map' rspec-core (2.8.0) lib/rspec/core/example_group.rb:351:in `run_examples' rspec-core (2.8.0) lib/rspec/core/example_group.rb:337:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `map' rspec-core (2.8.0) lib/rspec/core/command_line.rb:28:in `run' rspec-core (2.8.0) lib/rspec/core/reporter.rb:34:in `report' rspec-core (2.8.0) lib/rspec/core/command_line.rb:25:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:80:in `run_in_process' rspec-core (2.8.0) lib/rspec/core/runner.rb:69:in `run' rspec-core (2.8.0) lib/rspec/core/runner.rb:10:in `autorun' /usr/local/bin/rspec:19 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:53:59 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"8WeqblT9D1r9VR0Zko9YIgfIwf9vbd5T5xzNvqonlYQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (20.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779239.90231.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (136.7ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 256ms (Views: 1.9ms | ActiveRecord: 157.2ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 16:54:00 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779239.90231.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.5ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (232.6ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 16:54:02 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:02 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"y2YXWEvvsjHwjozG1hyizgijacpf0MEzRHHxM6HOfmM=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779242.39991.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (84.4ms) commit transaction Completed 200 OK in 91ms (Views: 0.5ms | ActiveRecord: 84.9ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 16:54:02 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779242.39991.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:04 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"y2YXWEvvsjHwjozG1hyizgijacpf0MEzRHHxM6HOfmM=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (89.6ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 16:54:06 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 17ms (Views: 14.1ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:07 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DwVgB2kGweefS61I/ITjkycvVF9aVbLQnFBzByV8imU=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779247.09493.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (80.3ms) commit transaction Completed 200 OK in 89ms (Views: 0.5ms | ActiveRecord: 80.9ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 16:54:07 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779247.09493.sample.jpg (0.1ms) Completed 200 OK in 4ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 16:54:09 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"DwVgB2kGweefS61I/ITjkycvVF9aVbLQnFBzByV8imU=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 5ms ArgumentError (wrong number of arguments (3 for 2)): app/controllers/users_controller.rb:8:in `update'  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (116.8ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 16:54:11 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.5ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 18ms (Views: 14.9ms | ActiveRecord: 0.9ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.5ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (70.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (76.3ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (73.7ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:11 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779251.92468.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (78.7ms) commit transaction Completed 200 OK in 94ms (Views: 0.6ms | ActiveRecord: 79.1ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 16:54:12 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779251.92468.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:12 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779252.33759.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (103.1ms) commit transaction Completed 200 OK in 148ms (Views: 0.5ms | ActiveRecord: 103.5ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 16:54:12 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779252.33759.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:12 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779252.79211.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (122.5ms) commit transaction Completed 200 OK in 138ms (Views: 0.7ms | ActiveRecord: 123.0ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 16:54:12 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779252.79211.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:13 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779253.16365.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (85.0ms) commit transaction Completed 200 OK in 100ms (Views: 0.6ms | ActiveRecord: 85.4ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 16:54:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779253.16365.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:13 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779253.51459.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (79.9ms) commit transaction Completed 200 OK in 105ms (Views: 0.5ms | ActiveRecord: 80.3ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 16:54:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779253.51459.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:13 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330779253.82932.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (72.9ms) commit transaction Completed 200 OK in 81ms (Views: 0.6ms | ActiveRecord: 73.4ms) Started GET "/avatars/9" for 127.0.0.1 at Sat Mar 03 16:54:13 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779253.82932.sample.png (0.3ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 16:54:15 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"u+BZ3mCMlpATatUuNh89qihDMQgt/hXyBi88oRqIP9E=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"9"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (15.5ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 110ms ArgumentError (wrong number of arguments (3 for 2)): app/controllers/users_controller.rb:8:in `update' Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (332.9ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 16:54:16 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 15ms (Views: 12.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:16 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"NlgUz4R7aCZwIYxejHGy1C1QPiSV7qMb8Gn5QeQi6Kc=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5 Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (73.0ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sat Mar 03 16:54:18 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 16:54:19 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"LU32lmM4bKoYvBDa4nnVQbL4NMj9UqEjCMFw3HyUgrQ=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330779259.04186.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (76.7ms) commit transaction Completed 200 OK in 83ms (Views: 0.5ms | ActiveRecord: 77.2ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 16:54:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330779259.04186.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (110.0ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sat Mar 03 16:54:21 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:21 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779261.54432.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (100.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 1  (90.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 261ms (Views: 1.0ms | ActiveRecord: 192.0ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:21 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (1.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779261.92986.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (122.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 2  (76.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 245ms (Views: 0.6ms | ActiveRecord: 201.9ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:22 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (1.8ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779262.33417.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (107.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.5ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 3  (82.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 310ms (Views: 2.7ms | ActiveRecord: 193.1ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:22 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779262.79998.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (78.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 4  (63.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 182ms (Views: 0.6ms | ActiveRecord: 143.3ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:23 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779263.19534.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (84.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 5  (64.9ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 208ms (Views: 0.6ms | ActiveRecord: 150.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:23 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779263.51726.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (69.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 6  (74.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 157ms (Views: 0.5ms | ActiveRecord: 145.1ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 16:54:25 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "id"=>"1"} Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (103.7ms) commit transaction Completed 200 OK in 141ms (Views: 0.7ms | ActiveRecord: 104.5ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 16:54:25 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "id"=>"2"} Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (77.8ms) commit transaction Completed 200 OK in 90ms (Views: 0.7ms | ActiveRecord: 78.2ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 16:54:25 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (104.8ms) commit transaction Completed 200 OK in 124ms (Views: 0.7ms | ActiveRecord: 105.2ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (8.9ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779266.23965.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (79.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 7  (77.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 207ms (Views: 0.6ms | ActiveRecord: 166.3ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 16:54:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"jbdOEvUpe5q28fMzzvFklt4Sml56KJi1Thb0pxoLcCI=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330779266.65453.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (82.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 8  (70.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 166ms (Views: 0.5ms | ActiveRecord: 153.7ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 7 Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 17:09:09 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (35.3ms) Completed 200 OK in 60ms (Views: 53.5ms | ActiveRecord: 1.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 17:09:09 +0400 2012 Served asset /attachments.js - 200 OK (5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 17:09:09 +0400 2012 Served asset /attachments.css - 200 OK (5ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 17:09:10 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 17:09:10 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:09:22 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"hmIhpnJwSFMxXdhfTVYfGOhH6Zi+/nVi57IjJw7ZfAU=", "container_id"=>"null", "file"=>#, @content_type="image/gif", @original_filename="1.gif", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"1.gif\"\r\nContent-Type: image/gif\r\n">}  (0.1ms) begin transaction SQL (106.0ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "1.gif"], ["filepath", "1330780162.71983.1.gif"], ["filesize", 9906], ["mimetype", "image/gif"], ["user_id", nil]]  (127.9ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 253ms (Views: 2.0ms | ActiveRecord: 233.9ms) Started GET "/avatars/11" for 127.0.0.1 at Sat Mar 03 17:09:23 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780162.71983.1.gif (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Started PUT "/users/1" for 127.0.0.1 at Sat Mar 03 17:09:24 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"hmIhpnJwSFMxXdhfTVYfGOhH6Zi+/nVi57IjJw7ZfAU=", "utf8"=>"✓", "id"=>"1", "file"=>"", "user"=>{"avatar_"=>"11"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.1ms) rollback transaction Completed 500 Internal Server Error in 4ms  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (118.8ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (99.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (71.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1')  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (184.4ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 17:12:36 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (66.1ms) Completed 200 OK in 215ms (Views: 208.0ms | ActiveRecord: 1.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 17:12:37 +0400 2012 Served asset /attachments.js - 200 OK (17ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 17:12:37 +0400 2012 Served asset /attachments.css - 200 OK (10ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 17:12:37 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 17:12:37 +0400 2012 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:37 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"OdqnU7eEdbGMEkqxSpHz1tAkrpUqpVLG4HTb3XqqcQg=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (13.4ms) begin transaction SQL (21.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780357.80948.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (123.7ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 247ms (Views: 2.4ms | ActiveRecord: 158.2ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 17:12:38 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780357.80948.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (108.9ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 17:12:39 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"AD+H1UewqIRkvRWw27uvJDehWjWWtkyRxbDMl/3hBtU=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780360.23616.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (111.6ms) commit transaction Completed 200 OK in 119ms (Views: 0.5ms | ActiveRecord: 112.1ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 17:12:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780360.23616.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:42 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"AD+H1UewqIRkvRWw27uvJDehWjWWtkyRxbDMl/3hBtU=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 25ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "users" VALUES(NULL)  (99.9ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 17:12:44 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 15ms (Views: 11.5ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:44 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"gja7PYZfDMNR1/9VGlf37zcAJDQbZxlI64KwAbTrxvs=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780364.91558.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (82.5ms) commit transaction Completed 200 OK in 99ms (Views: 0.5ms | ActiveRecord: 83.1ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 17:12:45 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780364.91558.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 17:12:46 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"gja7PYZfDMNR1/9VGlf37zcAJDQbZxlI64KwAbTrxvs=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 3  (93.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 120ms (Views: 8.6ms | ActiveRecord: 95.2ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 17:12:47 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780364.91558.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:47 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"gja7PYZfDMNR1/9VGlf37zcAJDQbZxlI64KwAbTrxvs=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780367.41228.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (118.2ms) commit transaction Completed 200 OK in 126ms (Views: 0.5ms | ActiveRecord: 118.8ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 17:12:47 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780367.41228.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/3" for 127.0.0.1 at Sat Mar 03 17:12:49 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"gja7PYZfDMNR1/9VGlf37zcAJDQbZxlI64KwAbTrxvs=", "utf8"=>"✓", "id"=>"3", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction Avatar Load (18.7ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.3ms) UPDATE "avatars" SET "user_id" = 3 WHERE "avatars"."id" = 4  (117.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 265ms (Views: 17.9ms | ActiveRecord: 137.6ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 17:12:49 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780367.41228.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (97.9ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 17:12:50 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.6ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars"   (0.1ms) begin transaction SQL (0.8ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (66.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (64.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (64.8ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780370.60224.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (89.2ms) commit transaction Completed 200 OK in 114ms (Views: 0.6ms | ActiveRecord: 89.6ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 17:12:50 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780370.60224.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780370.95202.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (105.4ms) commit transaction Completed 200 OK in 122ms (Views: 0.6ms | ActiveRecord: 105.9ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 17:12:51 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780370.95202.sample.jpg (0.2ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:51 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780371.44543.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (98.5ms) commit transaction Completed 200 OK in 152ms (Views: 0.8ms | ActiveRecord: 99.1ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 17:12:51 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780371.44543.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:51 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780371.88658.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (104.3ms) commit transaction Completed 200 OK in 134ms (Views: 0.6ms | ActiveRecord: 104.8ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 17:12:52 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780371.88658.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:52 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780372.30293.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (115.7ms) commit transaction Completed 200 OK in 161ms (Views: 2.3ms | ActiveRecord: 116.2ms) Started GET "/avatars/9" for 127.0.0.1 at Sat Mar 03 17:12:52 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780372.30293.sample.jpg (0.2ms) Completed 200 OK in 9ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:52 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330780372.79723.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (129.4ms) commit transaction Completed 200 OK in 145ms (Views: 0.5ms | ActiveRecord: 129.8ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 17:12:52 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780372.79723.sample.png (0.1ms) Completed 200 OK in 9ms (ActiveRecord: 0.1ms) Started PUT "/users/4" for 127.0.0.1 at Sat Mar 03 17:12:54 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"+P7Qrh+qZRirG2IJm/gRH/aWZyDv/OF5GtxiB6klecw=", "utf8"=>"✓", "id"=>"4", "file"=>"", "user"=>{"avatar_"=>"10"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 10 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 4 WHERE "avatars"."id" = 10  (117.4ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 139ms (Views: 8.8ms | ActiveRecord: 118.9ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 17:12:55 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780372.79723.sample.png (0.1ms) Completed 200 OK in 108ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (111.7ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 17:12:55 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:55 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"Er3aC8VjO+Az3TlnNqtQTtFA5B14JA6iKYvpmtrpDBQ=", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 19ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 5 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (113.3ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sat Mar 03 17:12:57 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 24ms (Views: 17.8ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:12:58 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"hLjaCoQpT0063tkcRayJcAXv16+N/ihlw7tKpy9O8X8=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330780378.19075.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (105.4ms) commit transaction Completed 200 OK in 114ms (Views: 0.5ms | ActiveRecord: 105.8ms) Started GET "/avatars/11" for 127.0.0.1 at Sat Mar 03 17:12:58 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330780378.19075.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "users" VALUES(NULL)  (132.3ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sat Mar 03 17:13:00 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:00 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780380.9168.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (104.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 1  (66.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 268ms (Views: 1.1ms | ActiveRecord: 172.1ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:01 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780381.367.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (112.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 2  (68.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 253ms (Views: 0.5ms | ActiveRecord: 182.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:01 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.4ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780381.70925.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (78.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 3  (67.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 193ms (Views: 0.6ms | ActiveRecord: 147.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:02 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (8.6ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780382.07736.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (115.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 4  (71.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 250ms (Views: 0.6ms | ActiveRecord: 196.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:02 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780382.61497.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (127.0ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 5  (72.3ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 319ms (Views: 0.9ms | ActiveRecord: 200.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:03 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780383.10458.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (148.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 6  (62.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 224ms (Views: 0.5ms | ActiveRecord: 211.9ms) Started DELETE "/documents/1" for 127.0.0.1 at Sat Mar 03 17:13:05 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "id"=>"1"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (101.6ms) commit transaction Completed 200 OK in 128ms (Views: 0.8ms | ActiveRecord: 102.2ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 17:13:05 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "id"=>"2"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (65.7ms) commit transaction Completed 200 OK in 121ms (Views: 0.6ms | ActiveRecord: 66.3ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 17:13:05 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (66.0ms) commit transaction Completed 200 OK in 81ms (Views: 0.5ms | ActiveRecord: 66.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:05 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780385.85251.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (124.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 7  (68.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 283ms (Views: 0.7ms | ActiveRecord: 193.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:13:06 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"xib+gM2uW0YPo5dK5QxavS/4YmZu0/QUlQtpSZn+nBc=", "container_id"=>"7", "file"=>#, @content_type="application/pdf", @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330780386.24973.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (166.4ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 7 WHERE "documents"."id" = 8  (88.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 348ms (Views: 0.5ms | ActiveRecord: 256.5ms)  (0.3ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 7  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (451.6ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (66.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (132.3ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sat Mar 03 17:27:30 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (63.4ms) Completed 200 OK in 234ms (Views: 227.7ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sat Mar 03 17:27:30 +0400 2012 Served asset /attachments.js - 200 OK (8ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sat Mar 03 17:27:30 +0400 2012 Served asset /attachments.css - 200 OK (7ms) Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 17:27:31 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sat Mar 03 17:27:31 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:31 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"dfYJuAhUuCbF1+UZsSff6JNMiOx0PwvTfFfMNmGRMiU=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (28.1ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781251.68584.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (325.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (69.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 568ms (Views: 2.5ms | ActiveRecord: 423.3ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.9ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (94.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (64.3ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sat Mar 03 17:27:33 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:34 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"xmwqY65VKIJvAIUT886IeoFAF/57+2/oQDtGmJWD1QY=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781254.28711.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (111.4ms) commit transaction Completed 200 OK in 127ms (Views: 0.8ms | ActiveRecord: 112.0ms) Started GET "/avatars/1" for 127.0.0.1 at Sat Mar 03 17:27:34 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781254.28711.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "users" VALUES(NULL)  (166.3ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sat Mar 03 17:27:36 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 15ms (Views: 12.6ms | ActiveRecord: 0.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:36 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781256.94199.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (117.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (67.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 266ms (Views: 0.6ms | ActiveRecord: 185.4ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781257.33695.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (81.9ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (64.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 268ms (Views: 0.6ms | ActiveRecord: 147.6ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781257.74692.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (83.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (65.8ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 249ms (Views: 0.6ms | ActiveRecord: 151.1ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781258.12109.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (169.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (63.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 294ms (Views: 2.2ms | ActiveRecord: 233.5ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781258.63862.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (106.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (15.3ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (70.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 350ms (Views: 0.7ms | ActiveRecord: 193.3ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:39 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781259.10465.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (77.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (70.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 165ms (Views: 0.5ms | ActiveRecord: 148.7ms) Started DELETE "/documents/2" for 127.0.0.1 at Sat Mar 03 17:27:41 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "id"=>"2"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (224.9ms) commit transaction Completed 200 OK in 262ms (Views: 0.6ms | ActiveRecord: 225.7ms) Started DELETE "/documents/3" for 127.0.0.1 at Sat Mar 03 17:27:41 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (70.2ms) commit transaction Completed 200 OK in 93ms (Views: 2.3ms | ActiveRecord: 70.7ms) Started DELETE "/documents/4" for 127.0.0.1 at Sat Mar 03 17:27:41 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "id"=>"4"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (62.0ms) commit transaction Completed 200 OK in 78ms (Views: 0.5ms | ActiveRecord: 62.7ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:42 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781262.08459.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (115.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (118.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 309ms (Views: 0.6ms | ActiveRecord: 234.8ms) Started POST "/documents" for 127.0.0.1 at Sat Mar 03 17:27:42 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"K2y2112Uyke66h4ZhYcc0IRMAYd7ChgjcwaH+uAjDK8=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330781262.52448.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (82.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (70.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 167ms (Views: 0.5ms | ActiveRecord: 153.4ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (98.4ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sat Mar 03 17:27:44 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (24.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 116ms (Views: 10.6ms | ActiveRecord: 24.9ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:45 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"Cwtjt/5da07ZWmpc2Uv1xoZNipxl1D0ivw9hdHhPEKw=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781265.12272.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (74.0ms) commit transaction Completed 200 OK in 81ms (Views: 0.6ms | ActiveRecord: 74.5ms) Started GET "/avatars/2" for 127.0.0.1 at Sat Mar 03 17:27:45 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781265.12272.sample.jpg (1.7ms) Completed 200 OK in 5ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (1.2ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (136.4ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sat Mar 03 17:27:47 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 23ms (Views: 14.8ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:47 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"GuZ9iIDh/5m5a/WfHbvtBac1YuVo/JP6BHrH2fW3ZGM=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781267.69888.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (95.1ms) commit transaction Completed 200 OK in 114ms (Views: 0.7ms | ActiveRecord: 95.5ms) Started GET "/avatars/3" for 127.0.0.1 at Sat Mar 03 17:27:47 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781267.69888.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:49 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"GuZ9iIDh/5m5a/WfHbvtBac1YuVo/JP6BHrH2fW3ZGM=", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (6.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 17ms (Views: 0.6ms | ActiveRecord: 6.8ms)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "users" VALUES(NULL)  (166.1ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sat Mar 03 17:27:52 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 14ms (Views: 11.1ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:52 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pizPXE+0NY9v7J308Rf2XLjkJMsbX3XU6vUiHv0CGOg=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781272.64527.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (80.4ms) commit transaction Completed 200 OK in 98ms (Views: 0.9ms | ActiveRecord: 80.8ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 17:27:52 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781272.64527.sample.jpg (0.3ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sat Mar 03 17:27:54 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"pizPXE+0NY9v7J308Rf2XLjkJMsbX3XU6vUiHv0CGOg=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 4  (118.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 147ms (Views: 11.8ms | ActiveRecord: 120.0ms) Started GET "/avatars/4" for 127.0.0.1 at Sat Mar 03 17:27:54 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781272.64527.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:55 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pizPXE+0NY9v7J308Rf2XLjkJMsbX3XU6vUiHv0CGOg=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781275.20189.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (108.3ms) commit transaction Completed 200 OK in 120ms (Views: 0.5ms | ActiveRecord: 108.8ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 17:27:55 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781275.20189.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sat Mar 03 17:27:57 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"pizPXE+0NY9v7J308Rf2XLjkJMsbX3XU6vUiHv0CGOg=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"5"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 5 LIMIT 1 Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 5  (91.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 113ms (Views: 9.4ms | ActiveRecord: 93.2ms) Started GET "/avatars/5" for 127.0.0.1 at Sat Mar 03 17:27:57 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781275.20189.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (93.0ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sat Mar 03 17:27:57 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.5ms) Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (99.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (76.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (65.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 5]]  (75.9ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:58 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781278.37307.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (111.9ms) commit transaction Completed 200 OK in 127ms (Views: 0.6ms | ActiveRecord: 112.3ms) Started GET "/avatars/6" for 127.0.0.1 at Sat Mar 03 17:27:58 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781278.37307.sample.jpg (0.2ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:58 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781278.7309.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (120.9ms) commit transaction Completed 200 OK in 136ms (Views: 2.1ms | ActiveRecord: 121.4ms) Started GET "/avatars/7" for 127.0.0.1 at Sat Mar 03 17:27:58 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781278.7309.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:59 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781279.18693.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (107.9ms) commit transaction Completed 200 OK in 131ms (Views: 0.7ms | ActiveRecord: 108.5ms) Started GET "/avatars/8" for 127.0.0.1 at Sat Mar 03 17:27:59 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781279.18693.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:59 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781279.55913.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (113.3ms) commit transaction Completed 200 OK in 130ms (Views: 0.5ms | ActiveRecord: 113.7ms) Started GET "/avatars/9" for 127.0.0.1 at Sat Mar 03 17:27:59 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781279.55913.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:27:59 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330781279.92436.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (106.1ms) commit transaction Completed 200 OK in 121ms (Views: 2.1ms | ActiveRecord: 106.6ms) Started GET "/avatars/10" for 127.0.0.1 at Sat Mar 03 17:28:00 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781279.92436.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sat Mar 03 17:28:00 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "container_id"=>"null", "file"=>#, @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330781280.27391.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (166.8ms) commit transaction Completed 200 OK in 173ms (Views: 0.4ms | ActiveRecord: 167.3ms) Started GET "/avatars/11" for 127.0.0.1 at Sat Mar 03 17:28:00 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781280.27391.sample.png (0.5ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Started PUT "/users/7" for 127.0.0.1 at Sat Mar 03 17:28:02 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"4+fJ6zB4uuE9zKAQzqoGxvfOvL6y4OmUVNuXi9/i/BU=", "utf8"=>"✓", "id"=>"7", "file"=>"", "user"=>{"avatar_"=>"11"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 11 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 7 WHERE "avatars"."id" = 11  (101.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (18.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 219ms (Views: 86.8ms | ActiveRecord: 120.5ms) Started GET "/avatars/11" for 127.0.0.1 at Sat Mar 03 17:28:02 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test_app/uploads/1330781280.27391.sample.png (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.2ms) select sqlite_version(*)  (110.3ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.0ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (88.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (74.0ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.8ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 22:44:59 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (191.6ms) Completed 200 OK in 261ms (Views: 253.4ms | ActiveRecord: 2.2ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 22:44:59 +0400 2012 Served asset /attachments.js - 200 OK (40ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 22:45:00 +0400 2012 Served asset /attachments.css - 200 OK (7ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 22:45:00 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 22:45:00 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:01 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (53.1ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886701.74733.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (96.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (69.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 272ms (Views: 19.5ms | ActiveRecord: 220.3ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.3ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.5ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (131.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (67.1ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 22:45:04 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 33ms (Views: 29.3ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:05 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886705.30908.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (112.0ms) commit transaction Completed 200 OK in 133ms (Views: 1.4ms | ActiveRecord: 112.6ms) Started GET "/avatars/1" for 127.0.0.1 at Sun Mar 04 22:45:05 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.6ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330886705.30908.sample.jpg (0.2ms) Completed 200 OK in 6ms (ActiveRecord: 0.6ms) Document Load (0.3ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (404.2ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 22:45:07 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 31ms (Views: 27.8ms | ActiveRecord: 0.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:08 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.3ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886708.40942.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (249.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (129.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 500ms (Views: 1.2ms | ActiveRecord: 380.3ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:09 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886709.41866.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (127.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (82.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 334ms (Views: 0.6ms | ActiveRecord: 211.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:10 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.6ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886710.16937.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (145.2ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (86.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 606ms (Views: 0.9ms | ActiveRecord: 233.3ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:10 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886711.00348.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (147.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (144.0ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 501ms (Views: 0.8ms | ActiveRecord: 292.4ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:11 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886711.78495.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (118.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (63.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 391ms (Views: 0.8ms | ActiveRecord: 183.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:12 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886712.4033.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (131.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (1.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (74.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 224ms (Views: 0.7ms | ActiveRecord: 208.7ms) Started DELETE "/documents/2" for 127.0.0.1 at Sun Mar 04 22:45:14 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"2"} WARNING: Can't verify CSRF token authenticity Document Load (9.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (105.0ms) commit transaction Completed 200 OK in 213ms (Views: 0.6ms | ActiveRecord: 114.8ms) Started DELETE "/documents/3" for 127.0.0.1 at Sun Mar 04 22:45:14 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"3"} WARNING: Can't verify CSRF token authenticity Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (132.9ms) commit transaction Completed 200 OK in 270ms (Views: 0.7ms | ActiveRecord: 133.5ms) Started DELETE "/documents/4" for 127.0.0.1 at Sun Mar 04 22:45:15 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"4"} WARNING: Can't verify CSRF token authenticity Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (82.3ms) commit transaction Completed 200 OK in 192ms (Views: 0.7ms | ActiveRecord: 82.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:16 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886716.09532.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (117.2ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (75.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 387ms (Views: 0.9ms | ActiveRecord: 194.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:45:16 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886716.7663.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (132.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (71.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 221ms (Views: 0.5ms | ActiveRecord: 205.1ms)  (0.3ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "users" VALUES(NULL)  (107.7ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sun Mar 04 22:45:19 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 26ms (Views: 22.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:19 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886719.54121.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (110.8ms) commit transaction Completed 200 OK in 124ms (Views: 0.6ms | ActiveRecord: 111.5ms) Started GET "/avatars/2" for 127.0.0.1 at Sun Mar 04 22:45:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test/uploads/1330886719.54121.sample.jpg (0.2ms) Completed 200 OK in 8ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (101.2ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sun Mar 04 22:45:21 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 211ms (Views: 207.9ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:22 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886722.61775.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (506.7ms) commit transaction Completed 200 OK in 516ms (Views: 0.7ms | ActiveRecord: 507.3ms) Started GET "/avatars/3" for 127.0.0.1 at Sun Mar 04 22:45:23 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330886722.61775.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:24 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 29ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "users" VALUES(NULL)  (101.3ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sun Mar 04 22:45:27 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (7.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.6ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 34ms (Views: 24.4ms | ActiveRecord: 7.9ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:27 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886727.47044.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (158.5ms) commit transaction Completed 200 OK in 175ms (Views: 6.6ms | ActiveRecord: 159.6ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 22:45:27 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330886727.47044.sample.jpg (0.2ms) Completed 200 OK in 6ms (ActiveRecord: 0.2ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 22:45:30 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"RudigDRP190D4HweRma8i340BbLQvVDe8e7tQlQzKq4=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"4"}} WARNING: Can't verify CSRF token authenticity User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 4  (128.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 170ms (Views: 22.6ms | ActiveRecord: 130.5ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 22:45:30 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330886727.47044.sample.jpg (0.3ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:31 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886731.18887.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (124.2ms) commit transaction Completed 200 OK in 146ms (Views: 0.6ms | ActiveRecord: 124.7ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 22:45:31 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330886731.18887.sample.jpg (0.2ms) Completed 200 OK in 13ms (ActiveRecord: 0.1ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 22:45:33 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"Y/r8bo+YIDkovvuQ4YYEvGdBfWyqm6yiiuHwEHNxjuQ=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"5"}} WARNING: Can't verify CSRF token authenticity User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 5 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 5  (122.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 187ms (Views: 14.3ms | ActiveRecord: 124.5ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 22:45:33 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330886731.18887.sample.jpg (0.2ms) Completed 200 OK in 7ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (73.5ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sun Mar 04 22:45:34 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 30ms (Views: 27.3ms | ActiveRecord: 0.6ms) Avatar Load (0.5ms) SELECT "avatars".* FROM "avatars"  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (75.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (134.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (64.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 5]]  (75.3ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:35 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886735.38676.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (114.5ms) commit transaction Completed 200 OK in 142ms (Views: 9.2ms | ActiveRecord: 115.2ms) Started GET "/avatars/6" for 127.0.0.1 at Sun Mar 04 22:45:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test/uploads/1330886735.38676.sample.jpg (0.1ms) Completed 200 OK in 10ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:36 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886736.28739.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (88.2ms) commit transaction Completed 200 OK in 124ms (Views: 0.9ms | ActiveRecord: 88.7ms) Started GET "/avatars/7" for 127.0.0.1 at Sun Mar 04 22:45:36 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test/uploads/1330886736.28739.sample.jpg (0.2ms) Completed 200 OK in 20ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:36 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886736.84868.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (129.7ms) commit transaction Completed 200 OK in 210ms (Views: 0.7ms | ActiveRecord: 130.1ms) Started GET "/avatars/8" for 127.0.0.1 at Sun Mar 04 22:45:37 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test/uploads/1330886736.84868.sample.jpg (0.2ms) Completed 200 OK in 10ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:37 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886737.64167.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (142.4ms) commit transaction Completed 200 OK in 205ms (Views: 0.6ms | ActiveRecord: 142.8ms) Started GET "/avatars/9" for 127.0.0.1 at Sun Mar 04 22:45:37 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test/uploads/1330886737.64167.sample.jpg (0.2ms) Completed 200 OK in 166ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:38 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886738.33938.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (133.6ms) commit transaction Completed 200 OK in 206ms (Views: 0.8ms | ActiveRecord: 134.1ms) Started GET "/avatars/10" for 127.0.0.1 at Sun Mar 04 22:45:38 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330886738.33938.sample.jpg (0.2ms) Completed 200 OK in 6ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:45:38 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330886738.92271.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (137.9ms) commit transaction Completed 200 OK in 150ms (Views: 0.7ms | ActiveRecord: 138.4ms) Started GET "/avatars/11" for 127.0.0.1 at Sun Mar 04 22:45:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test/uploads/1330886738.92271.sample.png (0.1ms) Completed 200 OK in 10ms (ActiveRecord: 0.1ms) Started PUT "/users/7" for 127.0.0.1 at Sun Mar 04 22:45:41 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"HjyozlHLois+QbuehijvjrlVo8xGxvIvCTMQTZ1wznU=", "utf8"=>"✓", "id"=>"7", "file"=>"", "user"=>{"avatar_"=>"11"}} WARNING: Can't verify CSRF token authenticity User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 11 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.4ms) UPDATE "avatars" SET "user_id" = 7 WHERE "avatars"."id" = 11  (120.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 159ms (Views: 22.6ms | ActiveRecord: 121.7ms) Started GET "/avatars/11" for 127.0.0.1 at Sun Mar 04 22:45:41 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test/uploads/1330886738.92271.sample.png (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (260.4ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (109.8ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (111.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (110.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (111.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (81.6ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.3ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.3ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (117.7ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 22:49:34 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (106.1ms) Completed 200 OK in 146ms (Views: 137.1ms | ActiveRecord: 2.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 22:49:35 +0400 2012 Served asset /attachments.js - 200 OK (52ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 22:49:35 +0400 2012 Served asset /attachments.css - 200 OK (29ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 22:49:36 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 22:49:36 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (24.8ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886977.32571.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (140.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (293.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 490ms (Views: 2.1ms | ActiveRecord: 459.9ms)  (0.3ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (89.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (64.4ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 22:49:39 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 60ms (Views: 57.3ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:49:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (2.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886980.69767.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (105.4ms) commit transaction Completed 200 OK in 133ms (Views: 1.1ms | ActiveRecord: 107.8ms) Started GET "/avatars/1" for 127.0.0.1 at Sun Mar 04 22:49:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330886980.69767.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Document Load (0.3ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (131.5ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 22:49:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 32ms (Views: 29.9ms | ActiveRecord: 0.6ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:43 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886983.43434.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (122.4ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (187.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 446ms (Views: 0.9ms | ActiveRecord: 311.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:44 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886984.14615.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (166.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (86.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 457ms (Views: 0.5ms | ActiveRecord: 254.5ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:44 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (9.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886984.9988.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (133.5ms) commit transaction User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (75.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 416ms (Views: 1.3ms | ActiveRecord: 219.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:45 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886985.6679.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (162.9ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (84.1ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 476ms (Views: 0.6ms | ActiveRecord: 248.5ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:46 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886986.4568.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (152.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (83.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 376ms (Views: 0.6ms | ActiveRecord: 237.3ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:46 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886987.00302.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (154.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (58.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 228ms (Views: 0.5ms | ActiveRecord: 214.5ms) Started DELETE "/documents/2" for 127.0.0.1 at Sun Mar 04 22:49:49 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"2"} WARNING: Can't verify CSRF token authenticity Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (128.9ms) commit transaction Completed 200 OK in 173ms (Views: 3.1ms | ActiveRecord: 129.6ms) Started DELETE "/documents/3" for 127.0.0.1 at Sun Mar 04 22:49:49 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"3"} WARNING: Can't verify CSRF token authenticity Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (77.0ms) commit transaction Completed 200 OK in 148ms (Views: 0.5ms | ActiveRecord: 77.4ms) Started DELETE "/documents/4" for 127.0.0.1 at Sun Mar 04 22:49:49 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"4"} WARNING: Can't verify CSRF token authenticity Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (83.2ms) commit transaction Completed 200 OK in 118ms (Views: 0.5ms | ActiveRecord: 83.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:50 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886990.4604.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (127.2ms) commit transaction User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (81.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 377ms (Views: 0.6ms | ActiveRecord: 211.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 22:49:51 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330886991.04681.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (90.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (60.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 166ms (Views: 0.8ms | ActiveRecord: 152.1ms)  (0.3ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (128.5ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sun Mar 04 22:49:53 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 50ms (Views: 32.3ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:49:53 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886993.68132.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (123.8ms) commit transaction Completed 200 OK in 132ms (Views: 0.5ms | ActiveRecord: 124.3ms) Started GET "/avatars/2" for 127.0.0.1 at Sun Mar 04 22:49:53 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test/uploads/1330886993.68132.sample.jpg (0.2ms) Completed 200 OK in 6ms (ActiveRecord: 0.2ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (146.6ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sun Mar 04 22:49:55 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 263ms (Views: 259.9ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:49:56 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330886996.93276.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (129.9ms) commit transaction Completed 200 OK in 139ms (Views: 0.7ms | ActiveRecord: 130.3ms) Started GET "/avatars/3" for 127.0.0.1 at Sun Mar 04 22:49:57 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (12.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330886996.93276.sample.jpg (0.2ms) Completed 200 OK in 16ms (ActiveRecord: 12.5ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:49:59 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (7.7ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 32ms (Views: 0.6ms | ActiveRecord: 8.1ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.6ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sun Mar 04 22:50:01 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 45ms (Views: 41.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:01 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887001.87128.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (118.9ms) commit transaction Completed 200 OK in 151ms (Views: 0.6ms | ActiveRecord: 119.3ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 22:50:02 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330887001.87128.sample.jpg (0.2ms) Completed 200 OK in 26ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 22:50:04 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"ANBhofutyNQ55OZoHQrgOpxG4MV/DDFyzn18va4aITU=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"4"}} WARNING: Can't verify CSRF token authenticity User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 4  (120.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 180ms (Views: 39.9ms | ActiveRecord: 121.4ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 22:50:04 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330887001.87128.sample.jpg (0.2ms) Completed 200 OK in 11ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:04 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887004.88704.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (128.2ms) commit transaction Completed 200 OK in 150ms (Views: 0.6ms | ActiveRecord: 128.6ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 22:50:05 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (11.0ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330887004.88704.sample.jpg (0.2ms) Completed 200 OK in 14ms (ActiveRecord: 11.0ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 22:50:07 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"TLV60cZIU48ta4RfZvrfnWEEe/qDSCY9mEtmvcKQsLA=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"5"}} WARNING: Can't verify CSRF token authenticity User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 5 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (0.5ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 5  (128.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 178ms (Views: 12.8ms | ActiveRecord: 130.7ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 22:50:07 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330887004.88704.sample.jpg (0.2ms) Completed 200 OK in 11ms (ActiveRecord: 0.2ms) Avatar Exists (0.3ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (211.5ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sun Mar 04 22:50:07 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 44ms (Views: 40.8ms | ActiveRecord: 0.6ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (73.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (71.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (64.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 5]]  (64.3ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:08 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887008.68477.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (106.0ms) commit transaction Completed 200 OK in 183ms (Views: 0.7ms | ActiveRecord: 106.5ms) Started GET "/avatars/6" for 127.0.0.1 at Sun Mar 04 22:50:08 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test/uploads/1330887008.68477.sample.jpg (0.2ms) Completed 200 OK in 17ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:09 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (11.7ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887009.23077.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (111.5ms) commit transaction Completed 200 OK in 189ms (Views: 0.7ms | ActiveRecord: 123.5ms) Started GET "/avatars/7" for 127.0.0.1 at Sun Mar 04 22:50:09 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test/uploads/1330887009.23077.sample.jpg (0.1ms) Completed 200 OK in 23ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:09 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887009.82498.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (176.6ms) commit transaction Completed 200 OK in 322ms (Views: 0.6ms | ActiveRecord: 177.0ms) Started GET "/avatars/8" for 127.0.0.1 at Sun Mar 04 22:50:10 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test/uploads/1330887009.82498.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:10 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887010.48937.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (124.4ms) commit transaction Completed 200 OK in 187ms (Views: 0.6ms | ActiveRecord: 124.9ms) Started GET "/avatars/9" for 127.0.0.1 at Sun Mar 04 22:50:10 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test/uploads/1330887010.48937.sample.jpg (0.1ms) Completed 200 OK in 119ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:11 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887011.23496.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (131.4ms) commit transaction Completed 200 OK in 240ms (Views: 0.9ms | ActiveRecord: 131.9ms) Started GET "/avatars/10" for 127.0.0.1 at Sun Mar 04 22:50:11 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330887011.23496.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 22:50:11 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330887011.92032.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (124.9ms) commit transaction Completed 200 OK in 161ms (Views: 0.7ms | ActiveRecord: 125.4ms) Started GET "/avatars/11" for 127.0.0.1 at Sun Mar 04 22:50:12 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test/uploads/1330887011.92032.sample.png (10.4ms) Completed 200 OK in 14ms (ActiveRecord: 0.2ms) Started PUT "/users/7" for 127.0.0.1 at Sun Mar 04 22:50:14 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"piUVPrsa6Sm6ETi2NM6LNGYOAKqfp6JG2xOnmKll6OE=", "utf8"=>"✓", "id"=>"7", "file"=>"", "user"=>{"avatar_"=>"11"}} WARNING: Can't verify CSRF token authenticity User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction Avatar Load (0.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 11 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 7 WHERE "avatars"."id" = 11  (110.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (4.5ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 165ms (Views: 16.0ms | ActiveRecord: 116.2ms) Started GET "/avatars/11" for 127.0.0.1 at Sun Mar 04 22:50:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test/uploads/1330887011.92032.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (742.3ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (487.8ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (400.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (566.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (656.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (611.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (395.9ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (311.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (3115.8ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:00:24 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (90.7ms) Completed 200 OK in 170ms (Views: 164.7ms | ActiveRecord: 1.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:00:25 +0400 2012 Served asset /attachments.js - 200 OK (195ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:00:25 +0400 2012 Served asset /attachments.css - 200 OK (63ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:00:25 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:00:25 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (35.6ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887626.16818.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (88.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (71.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 262ms (Views: 21.8ms | ActiveRecord: 196.2ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (109.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (64.6ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 23:00:28 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 33ms (Views: 30.8ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:28 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887628.81589.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (78.4ms) commit transaction Completed 200 OK in 95ms (Views: 1.1ms | ActiveRecord: 78.8ms) Started GET "/avatars/1" for 127.0.0.1 at Sun Mar 04 23:00:28 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330887628.81589.sample.jpg (0.2ms) Completed 200 OK in 8ms (ActiveRecord: 0.2ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (81.2ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 23:00:30 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:31 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887631.26723.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (164.5ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (168.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 578ms (Views: 2.6ms | ActiveRecord: 334.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:32 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887632.11239.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (138.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (75.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 395ms (Views: 0.6ms | ActiveRecord: 214.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:32 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887632.67425.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (285.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (11.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (65.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 537ms (Views: 0.6ms | ActiveRecord: 362.4ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:33 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.2ms) begin transaction SQL (3.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887633.41769.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (80.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (66.3ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 321ms (Views: 0.7ms | ActiveRecord: 151.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:33 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887633.81961.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (83.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (91.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 308ms (Views: 0.6ms | ActiveRecord: 175.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:34 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887634.25582.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (544.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (178.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 736ms (Views: 0.5ms | ActiveRecord: 724.7ms) Started DELETE "/documents/2" for 127.0.0.1 at Sun Mar 04 23:00:36 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"2"} WARNING: Can't verify CSRF token authenticity Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (83.1ms) commit transaction Completed 200 OK in 123ms (Views: 0.6ms | ActiveRecord: 83.8ms) Started DELETE "/documents/3" for 127.0.0.1 at Sun Mar 04 23:00:36 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"3"} WARNING: Can't verify CSRF token authenticity Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (1.8ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (112.8ms) commit transaction Completed 200 OK in 194ms (Views: 0.7ms | ActiveRecord: 114.8ms) Started DELETE "/documents/4" for 127.0.0.1 at Sun Mar 04 23:00:36 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"", "id"=>"4"} WARNING: Can't verify CSRF token authenticity Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (92.6ms) commit transaction Completed 200 OK in 177ms (Views: 0.6ms | ActiveRecord: 93.1ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887637.47958.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (222.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (80.8ms) commit transaction  (1.7ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 447ms (Views: 0.6ms | ActiveRecord: 306.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:00:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330887638.14348.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (81.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (117.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 224ms (Views: 0.5ms | ActiveRecord: 200.1ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (102.9ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sun Mar 04 23:00:40 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (10.0ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 34ms (Views: 21.5ms | ActiveRecord: 10.5ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887640.73059.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (82.7ms) commit transaction Completed 200 OK in 102ms (Views: 0.5ms | ActiveRecord: 83.2ms) Started GET "/avatars/2" for 127.0.0.1 at Sun Mar 04 23:00:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test/uploads/1330887640.73059.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (61.2ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sun Mar 04 23:00:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 24ms (Views: 22.0ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:43 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887643.48903.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (118.0ms) commit transaction Completed 200 OK in 136ms (Views: 0.6ms | ActiveRecord: 118.5ms) Started GET "/avatars/3" for 127.0.0.1 at Sun Mar 04 23:00:43 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330887643.48903.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:45 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 17ms (Views: 7.4ms | ActiveRecord: 0.5ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (116.1ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sun Mar 04 23:00:48 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 24ms (Views: 21.1ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:48 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887648.45568.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (131.0ms) commit transaction Completed 200 OK in 150ms (Views: 0.5ms | ActiveRecord: 131.5ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 23:00:48 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330887648.45568.sample.jpg (0.1ms) Completed 200 OK in 4ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 23:00:50 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"MAQfA6+G253SpxbSQItlU2MO2LFvlOeO3wGIWUS8wMg=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"4"}} WARNING: Can't verify CSRF token authenticity User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 4  (81.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 279ms (Views: 21.2ms | ActiveRecord: 82.5ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 23:00:50 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330887648.45568.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:51 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (13.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887651.43106.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (121.5ms) commit transaction Completed 200 OK in 143ms (Views: 0.5ms | ActiveRecord: 134.9ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 23:00:51 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330887651.43106.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 23:00:53 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"41wMdD7H08NVMePJm+eCsMjDmwHrVz+TzQZ4oDPhhUo=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"5"}} WARNING: Can't verify CSRF token authenticity User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 5 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 SQL (0.7ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (0.5ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 5  (198.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 240ms (Views: 18.1ms | ActiveRecord: 200.5ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 23:00:53 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330887651.43106.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (112.1ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sun Mar 04 23:00:54 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 22ms (Views: 19.4ms | ActiveRecord: 0.7ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (63.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (64.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (64.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 5]]  (109.1ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:55 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.5ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887655.10619.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (211.7ms) commit transaction Completed 200 OK in 298ms (Views: 0.8ms | ActiveRecord: 212.4ms) Started GET "/avatars/6" for 127.0.0.1 at Sun Mar 04 23:00:55 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test/uploads/1330887655.10619.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:55 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887655.80139.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (116.5ms) commit transaction Completed 200 OK in 212ms (Views: 0.7ms | ActiveRecord: 117.0ms) Started GET "/avatars/7" for 127.0.0.1 at Sun Mar 04 23:00:56 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test/uploads/1330887655.80139.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:56 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887656.35041.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (133.1ms) commit transaction Completed 200 OK in 203ms (Views: 0.6ms | ActiveRecord: 133.7ms) Started GET "/avatars/8" for 127.0.0.1 at Sun Mar 04 23:00:56 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test/uploads/1330887656.35041.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:56 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887656.86876.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (137.6ms) commit transaction Completed 200 OK in 161ms (Views: 0.6ms | ActiveRecord: 138.1ms) Started GET "/avatars/9" for 127.0.0.1 at Sun Mar 04 23:00:57 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test/uploads/1330887656.86876.sample.jpg (0.1ms) Completed 200 OK in 8ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:57 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330887657.60467.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (131.4ms) commit transaction Completed 200 OK in 230ms (Views: 0.7ms | ActiveRecord: 131.8ms) Started GET "/avatars/10" for 127.0.0.1 at Sun Mar 04 23:00:57 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330887657.60467.sample.jpg (0.1ms) Completed 200 OK in 5ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:00:58 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330887658.23424.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (82.4ms) commit transaction Completed 200 OK in 89ms (Views: 0.6ms | ActiveRecord: 82.8ms) Started GET "/avatars/11" for 127.0.0.1 at Sun Mar 04 23:00:58 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test/uploads/1330887658.23424.sample.png (0.2ms) Completed 200 OK in 13ms (ActiveRecord: 0.2ms) Started PUT "/users/7" for 127.0.0.1 at Sun Mar 04 23:01:00 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"7P/9+3iscbhnP+CaKqXDM+ZZe4v03e9iJ9+Xtiz9C9s=", "utf8"=>"✓", "id"=>"7", "file"=>"", "user"=>{"avatar_"=>"11"}} WARNING: Can't verify CSRF token authenticity User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 11 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 7 WHERE "avatars"."id" = 11  (127.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 191ms (Views: 22.6ms | ActiveRecord: 129.2ms) Started GET "/avatars/11" for 127.0.0.1 at Sun Mar 04 23:01:00 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"11"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "11"]] Sent file /home/alex/simple_attachments/test/uploads/1330887658.23424.sample.png (0.5ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Mar 04 23:08:36 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:08:37 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:08:37 +0400 2012 Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:08:43 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (70.6ms) Completed 200 OK in 250ms (Views: 238.5ms | ActiveRecord: 2.0ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:08:44 +0400 2012 Served asset /attachments.js - 200 OK (6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:08:44 +0400 2012 Served asset /attachments.css - 200 OK (10ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:08:53 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @content_type="image/gif", @original_filename="WIN.gif">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (26.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "WIN.gif"], ["filepath", "1330888133.62299.WIN.gif"], ["filesize", 17567], ["mimetype", "image/gif"], ["user_id", nil]]  (111.8ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 161ms (Views: 2.1ms | ActiveRecord: 138.3ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:08:53 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 10ms (ActiveRecord: 0.3ms) Started PUT "/users/1" for 127.0.0.1 at Sun Mar 04 23:09:18 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"s=", "utf8"=>"✓", "id"=>"1", "file"=>"", "user"=>{"avatar_"=>"12"}} WARNING: Can't verify CSRF token authenticity User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Avatar Load (1.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 12 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 1 WHERE "avatars"."id" = 12  (99.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (14.9ms) Completed 200 OK in 265ms (Views: 18.1ms | ActiveRecord: 102.2ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:09:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started GET "/users/1" for 127.0.0.1 at Sun Mar 04 23:11:38 +0400 2012 ActionController::RoutingError (No route matches [GET] "/users/1"): actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward' rack-cache (1.1) lib/rack/cache/context.rb:241:in `fetch' rack-cache (1.1) lib/rack/cache/context.rb:181:in `lookup' rack-cache (1.1) lib/rack/cache/context.rb:65:in `call!' rack-cache (1.1) lib/rack/cache/context.rb:50:in `call' railties (3.2.2) lib/rails/engine.rb:479:in `call' railties (3.2.2) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/content_length.rb:14:in `call' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' rack (1.4.1) lib/rack/server.rb:265:in `start' railties (3.2.2) lib/rails/commands/server.rb:70:in `start' railties (3.2.2) lib/rails/commands.rb:55 railties (3.2.2) lib/rails/commands.rb:50:in `tap' railties (3.2.2) lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:11:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (151.5ms) Completed 500 Internal Server Error in 453ms ActionView::Template::Error (No expansion found for :attachments): 2: 3: 4: <%= javascript_include_tag 'http://code.jquery.com/jquery-latest.min.js' %> 5: <%= javascript_include_tag :attachments %> 6: <%= stylesheet_link_tag :attachments %> 7: 8: app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___1891707339_69919821641980' Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:12:40 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (92.9ms) Completed 500 Internal Server Error in 286ms ActionView::Template::Error (No expansion found for :attachments): 2: 3: 4: <%= javascript_include_tag 'http://code.jquery.com/jquery-latest.min.js' %> 5: <%= javascript_include_tag :attachments %> 6: <%= stylesheet_link_tag :attachments %> 7: 8: app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___1891707339_70254379825840' Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:13:53 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (98.8ms) Completed 500 Internal Server Error in 273ms ActionView::Template::Error (No expansion found for :attachments): 2: 3: 4: <%= javascript_include_tag 'http://code.jquery.com/jquery-latest.min.js' %> 5: <%= javascript_include_tag :attachments %> 6: <%= stylesheet_link_tag :attachments %> 7: 8: app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___1891707339_69826819521060' Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:14:37 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (58.3ms) Completed 200 OK in 102ms (Views: 87.0ms | ActiveRecord: 8.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:14:38 +0400 2012 Compiled simple_attachments.js (8ms) (pid 6518) Compiled attachments.js (54ms) (pid 6518) Served asset /attachments.js - 200 OK (112ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:14:38 +0400 2012 Compiled simple_attachments.css (0ms) (pid 6518) Compiled attachments.css (6ms) (pid 6518) Served asset /attachments.css - 200 OK (109ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:14:38 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:14:44 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="1.jpg">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 11ms (Views: 1.9ms | ActiveRecord: 0.3ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:15:04 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @content_type="image/gif", @original_filename="1.gif">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (34.7ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "1.gif"], ["filepath", "1330888504.16714.1.gif"], ["filesize", 9906], ["mimetype", "image/gif"], ["user_id", nil]]  (125.7ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 176ms (Views: 0.8ms | ActiveRecord: 160.5ms) Started GET "/avatars/13" for 127.0.0.1 at Sun Mar 04 23:15:04 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"13"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "13"]] Sent file /home/alex/simple_attachments/test/uploads/1330888504.16714.1.gif (0.1ms) Completed 200 OK in 6ms (ActiveRecord: 0.2ms) Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:16:22 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (71.5ms) Completed 200 OK in 120ms (Views: 105.3ms | ActiveRecord: 2.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:16:23 +0400 2012 Served asset /attachments.js - 304 Not Modified (16ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:16:23 +0400 2012 Served asset /attachments.css - 304 Not Modified (12ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:16:23 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 19ms (ActiveRecord: 0.3ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:16:26 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"ANV8CeH+zAV0de7zzZ6KoWMYVBW4ijwZsdJxhcQ5frU=", "container_id"=>"null", "file"=>#, @content_type="image/gif", @original_filename="1.gif">}  (0.1ms) begin transaction SQL (38.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "1.gif"], ["filepath", "1330888586.99975.1.gif"], ["filesize", 9906], ["mimetype", "image/gif"], ["user_id", nil]]  (131.5ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 182ms (Views: 2.8ms | ActiveRecord: 169.8ms) Started GET "/avatars/14" for 127.0.0.1 at Sun Mar 04 23:16:27 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"14"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "14"]] Sent file /home/alex/simple_attachments/test/uploads/1330888586.99975.1.gif (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:16:47 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ANV8CeH+zAV0de7zzZ6KoWMYVBW4ijwZsdJxhcQ5frU=", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part1.pdf">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "shen-logic-part1.pdf"], ["filepath", "1330888607.58249.shen-logic-part1.pdf"], ["filesize", 929253], ["mimetype", "application/pdf"], ["user_id", nil]]  (155.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 10  (68.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 280ms (Views: 5.9ms | ActiveRecord: 225.0ms) Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:16:52 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (30.6ms) Completed 200 OK in 50ms (Views: 47.6ms | ActiveRecord: 0.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:16:52 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:16:52 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:16:53 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:17:42 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (71.6ms) Completed 200 OK in 104ms (Views: 94.9ms | ActiveRecord: 2.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:17:42 +0400 2012 Served asset /attachments.js - 304 Not Modified (13ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:17:42 +0400 2012 Served asset /attachments.css - 304 Not Modified (15ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:17:42 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.2ms) Completed 200 OK in 17ms (ActiveRecord: 0.2ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:17:59 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 5ms (ActiveRecord: 1.0ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:18:09 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} CACHE (0.0ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.0ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:18:57 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"ANV8CeH+zAV0de7zzZ6KoWMYVBW4ijwZsdJxhcQ5frU=", "container_id"=>"null", "file"=>#, @content_type="image/jpeg", @original_filename="1.jpg">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 17ms (Views: 2.7ms | ActiveRecord: 0.4ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:19:06 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 4ms (ActiveRecord: 0.9ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:30:39 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (19.7ms) Completed 200 OK in 31ms (ActiveRecord: 0.8ms) Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:30:49 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (80.3ms) ERROR: compiling _app_views_layouts_application_html_erb___1891707339_70079778577320 RAISED compile error /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:11: unknown regexp options - bdy /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:11: unmatched ): /head> ');@output_buffer.append= ( yield );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ^ /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:12: unterminated string meets end of file Function body: def _app_views_layouts_application_html_erb___1891707339_70079778577320(local_assigns, output_buffer) _old_virtual_path, @virtual_path = @virtual_path, "layouts/application";_old_output_buffer = @output_buffer;;@output_buffer = output_buffer || ActionView::OutputBuffer.new;@output_buffer.safe_concat(' ');@output_buffer.append= ( javascript_include_tag 'http://code.jquery.com/jquery-latest.min.js' );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ');@output_buffer.append= ( javascript_include_tag :attachments );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ');@output_buffer.append= ( stylesheet_link_tag :attachments );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ');@output_buffer.append= ( #csrf_meta_tags );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ');@output_buffer.append= ( yield );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ');@output_buffer.to_s ensure @virtual_path, @output_buffer = _old_virtual_path, _old_output_buffer end Backtrace: /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:12:in `compile' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/template.rb:233:in `compile!' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/template.rb:142:in `render' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/notifications.rb:125:in `instrument' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/template.rb:141:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/renderer/template_renderer.rb:40:in `render_template' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/renderer/template_renderer.rb:13:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/renderer/renderer.rb:36:in `render_template' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_view/renderer/renderer.rb:17:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:109:in `_render_template' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/streaming.rb:225:in `_render_template' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:103:in `render_to_body' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/renderers.rb:28:in `render_to_body' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/compatibility.rb:50:in `render_to_body' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:88:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/rendering.rb:16:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:40:in `render' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/core_ext/benchmark.rb:5:in `ms' /usr/lib64/ruby/1.8/benchmark.rb:308:in `realtime' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/core_ext/benchmark.rb:5:in `ms' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:40:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' /home/alex/.gem/ruby/1.8/gems/activerecord-3.2.2/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:39:in `render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/implicit_render.rb:10:in `default_render' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/implicit_render.rb:5:in `send_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/base.rb:167:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/rendering.rb:10:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/callbacks.rb:18:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:425:in `_run__434435962__process_action__1992409046__callbacks' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `send' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `send' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/callbacks.rb:17:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/rescue.rb:29:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/notifications.rb:123:in `instrument' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/notifications.rb:123:in `instrument' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/params_wrapper.rb:205:in `process_action' /home/alex/.gem/ruby/1.8/gems/activerecord-3.2.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/base.rb:121:in `process' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:45:in `process' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal.rb:203:in `dispatch' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_controller/metal.rb:246:in `action' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:67:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:67:in `dispatch' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:30:in `call' /usr/local/lib64/ruby/gems/1.8/gems/journey-1.0.3/lib/journey/router.rb:68:in `call' /usr/local/lib64/ruby/gems/1.8/gems/journey-1.0.3/lib/journey/router.rb:56:in `each' /usr/local/lib64/ruby/gems/1.8/gems/journey-1.0.3/lib/journey/router.rb:56:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:594:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/head.rb:14:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/flash.rb:242:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/cookies.rb:338:in `call' /home/alex/.gem/ruby/1.8/gems/activerecord-3.2.2/lib/active_record/query_cache.rb:64:in `call' /home/alex/.gem/ruby/1.8/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `call' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `send' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `send' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/sendfile.rb:102:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/rack/logger.rb:26:in `call_app' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/rack/logger.rb:16:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/request_id.rb:22:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call' /usr/local/lib64/ruby/gems/1.8/gems/activesupport-3.2.2/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call' /usr/local/lib64/ruby/gems/1.8/gems/actionpack-3.2.2/lib/action_dispatch/middleware/static.rb:61:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:132:in `forward' /usr/local/lib64/ruby/gems/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:241:in `fetch' /usr/local/lib64/ruby/gems/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:181:in `lookup' /usr/local/lib64/ruby/gems/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:65:in `call!' /usr/local/lib64/ruby/gems/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:50:in `call' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/engine.rb:479:in `call' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/application.rb:220:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/rack/log_tailer.rb:14:in `call' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:13:in `run' /usr/local/lib64/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/server.rb:265:in `start' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/commands/server.rb:70:in `start' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/commands.rb:55 /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap' /home/alex/.gem/ruby/1.8/gems/railties-3.2.2/lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Completed 500 Internal Server Error in 143ms ActionView::Template::Error (compile error /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:11: unknown regexp options - bdy /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:11: unmatched ): /head> ');@output_buffer.append= ( yield );@output_buffer.safe_concat(' ');@output_buffer.safe_concat(' ^ /home/alex/simple_attachments/test/app/views/layouts/application.html.erb:12: unterminated string meets end of file): 8: 9: 10: <%= yield %> 11: 12: app/views/layouts/application.html.erb:12:in `compile' Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:30:49 +0400 2012 ActionController::RoutingError (No route matches [GET] "/favicon.ico"): actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call' rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward' rack-cache (1.1) lib/rack/cache/context.rb:241:in `fetch' rack-cache (1.1) lib/rack/cache/context.rb:181:in `lookup' rack-cache (1.1) lib/rack/cache/context.rb:65:in `call!' rack-cache (1.1) lib/rack/cache/context.rb:50:in `call' railties (3.2.2) lib/rails/engine.rb:479:in `call' railties (3.2.2) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/content_length.rb:14:in `call' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' rack (1.4.1) lib/rack/server.rb:265:in `start' railties (3.2.2) lib/rails/commands/server.rb:70:in `start' railties (3.2.2) lib/rails/commands.rb:55 railties (3.2.2) lib/rails/commands.rb:50:in `tap' railties (3.2.2) lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:30:49 +0400 2012 ActionController::RoutingError (No route matches [GET] "/favicon.ico"): actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call' rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward' rack-cache (1.1) lib/rack/cache/context.rb:241:in `fetch' rack-cache (1.1) lib/rack/cache/context.rb:181:in `lookup' rack-cache (1.1) lib/rack/cache/context.rb:65:in `call!' rack-cache (1.1) lib/rack/cache/context.rb:50:in `call' railties (3.2.2) lib/rails/engine.rb:479:in `call' railties (3.2.2) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/content_length.rb:14:in `call' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' rack (1.4.1) lib/rack/server.rb:265:in `start' railties (3.2.2) lib/rails/commands/server.rb:70:in `start' railties (3.2.2) lib/rails/commands.rb:55 railties (3.2.2) lib/rails/commands.rb:50:in `tap' railties (3.2.2) lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:31:59 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (50.5ms) Completed 200 OK in 73ms (Views: 67.4ms | ActiveRecord: 1.4ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:32:00 +0400 2012 Served asset /attachments.js - 304 Not Modified (18ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:32:00 +0400 2012 Served asset /attachments.css - 304 Not Modified (84ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:32:00 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:32:04 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @content_type="image/png", @original_filename="1.png">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 35ms (Views: 14.4ms | ActiveRecord: 0.4ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:33:00 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @content_type="image/png", @original_filename="533px-Coat_of_Arms_of_Cuba.svg.png">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 12ms (Views: 2.2ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:33:05 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part2.pdf">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (28.6ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "shen-logic-part2.pdf"], ["filepath", "1330889585.30006.shen-logic-part2.pdf"], ["filesize", 1750619], ["mimetype", "application/pdf"], ["user_id", nil]]  (161.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 11  (76.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 360ms (Views: 0.7ms | ActiveRecord: 267.1ms) Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:42:23 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (1.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (12.6ms) Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 1.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:42:23 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:42:23 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:42:23 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:49:18 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (50.4ms) Completed 200 OK in 72ms (Views: 66.5ms | ActiveRecord: 1.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:49:18 +0400 2012 Served asset /attachments.js - 304 Not Modified (9ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:49:18 +0400 2012 Served asset /attachments.css - 304 Not Modified (5ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:49:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/1" for 127.0.0.1 at Sun Mar 04 23:49:20 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"OWJ7XXrAIQBZjYDTq3FJ5K0Xd4Ia0DMXBFe+oDS1dH8=", "utf8"=>"✓", "id"=>"1", "file"=>"", "user"=>{"avatar_"=>"12"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 12 LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  (0.1ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (10.1ms) Completed 200 OK in 73ms (Views: 11.9ms | ActiveRecord: 2.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:49:20 +0400 2012 Served asset /attachments.js - 304 Not Modified (1ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:49:20 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:49:20 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:49:22 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part2.pdf">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 13ms (Views: 2.9ms | ActiveRecord: 0.5ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:49:25 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part1.pdf">} WARNING: Can't verify CSRF token authenticity  (0.1ms) begin transaction SQL (18.9ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "shen-logic-part1.pdf"], ["filepath", "1330890565.79547.shen-logic-part1.pdf"], ["filesize", 929253], ["mimetype", "application/pdf"], ["user_id", nil]]  (98.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 12  (60.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 213ms (Views: 1.2ms | ActiveRecord: 177.8ms) Started PUT "/users/1" for 127.0.0.1 at Sun Mar 04 23:49:51 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"OWJ7XXrAIQBZjYDTq3FJ5K0Xd4Ia0DMXBFe+oDS1dH8=", "utf8"=>"✓", "id"=>"1", "file"=>"", "user"=>{"avatar_"=>"12"}} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 12 LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  (0.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (109.4ms) Completed 200 OK in 170ms (Views: 126.7ms | ActiveRecord: 2.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:49:51 +0400 2012 Served asset /attachments.js - 304 Not Modified (5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:49:51 +0400 2012 Served asset /attachments.css - 304 Not Modified (5ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:49:51 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:49:55 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part3.pdf">} WARNING: Can't verify CSRF token authenticity Completed 500 Internal Server Error in 1921ms NameError (undefined local variable or method `ahgakjgjka' for #): /home/alex/simple_attachments/lib/simple_attachments/attachments_controller.rb:93:in `handle_unverified_request' actionpack (3.2.2) lib/action_controller/metal/request_forgery_protection.rb:78:in `verify_authenticity_token' activesupport (3.2.2) lib/active_support/callbacks.rb:407:in `_run__2110466507__process_action__1623385099__callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.2) lib/abstract_controller/callbacks.rb:17:in `process_action' actionpack (3.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action' activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument' activesupport (3.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:29:in `process_action' actionpack (3.2.2) lib/action_controller/metal/params_wrapper.rb:205:in `process_action' activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action' actionpack (3.2.2) lib/abstract_controller/base.rb:121:in `process' actionpack (3.2.2) lib/abstract_controller/rendering.rb:45:in `process' actionpack (3.2.2) lib/action_controller/metal.rb:203:in `dispatch' actionpack (3.2.2) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' actionpack (3.2.2) lib/action_controller/metal.rb:246:in `action' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `call' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `dispatch' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:30:in `call' journey (1.0.3) lib/journey/router.rb:68:in `call' journey (1.0.3) lib/journey/router.rb:56:in `each' journey (1.0.3) lib/journey/router.rb:56:in `call' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' rack (1.4.1) lib/rack/etag.rb:23:in `call' rack (1.4.1) lib/rack/conditionalget.rb:35:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/head.rb:14:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/params_parser.rb:21:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/flash.rb:242:in `call' rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context' rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/cookies.rb:338:in `call' activerecord (3.2.2) lib/active_record/query_cache.rb:64:in `call' activerecord (3.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in `call' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call' rack (1.4.1) lib/rack/sendfile.rb:102:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call' rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward' rack-cache (1.1) lib/rack/cache/context.rb:139:in `pass' rack-cache (1.1) lib/rack/cache/context.rb:151:in `invalidate' rack-cache (1.1) lib/rack/cache/context.rb:70:in `call!' rack-cache (1.1) lib/rack/cache/context.rb:50:in `call' railties (3.2.2) lib/rails/engine.rb:479:in `call' railties (3.2.2) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/content_length.rb:14:in `call' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' rack (1.4.1) lib/rack/server.rb:265:in `start' railties (3.2.2) lib/rails/commands/server.rb:70:in `start' railties (3.2.2) lib/rails/commands.rb:55 railties (3.2.2) lib/rails/commands.rb:50:in `tap' railties (3.2.2) lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Started GET "/users/1" for 127.0.0.1 at Sun Mar 04 23:50:45 +0400 2012 ActionController::RoutingError (No route matches [GET] "/users/1"): actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call' rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward' rack-cache (1.1) lib/rack/cache/context.rb:241:in `fetch' rack-cache (1.1) lib/rack/cache/context.rb:181:in `lookup' rack-cache (1.1) lib/rack/cache/context.rb:65:in `call!' rack-cache (1.1) lib/rack/cache/context.rb:50:in `call' railties (3.2.2) lib/rails/engine.rb:479:in `call' railties (3.2.2) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/content_length.rb:14:in `call' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' rack (1.4.1) lib/rack/server.rb:265:in `start' railties (3.2.2) lib/rails/commands/server.rb:70:in `start' railties (3.2.2) lib/rails/commands.rb:55 railties (3.2.2) lib/rails/commands.rb:50:in `tap' railties (3.2.2) lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:50:49 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (48.9ms) Completed 200 OK in 73ms (Views: 66.5ms | ActiveRecord: 1.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:50:49 +0400 2012 Served asset /attachments.js - 304 Not Modified (5ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:50:49 +0400 2012 Served asset /attachments.css - 304 Not Modified (6ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:50:49 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.3ms) Started PUT "/users/1" for 127.0.0.1 at Sun Mar 04 23:50:51 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"OWJ7XXrAIQBZjYDTq3FJ5K0Xd4Ia0DMXBFe+oDS1dH8=", "utf8"=>"✓", "id"=>"1", "file"=>"", "user"=>{"avatar_"=>"12"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 12 LIMIT 1 User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  (0.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (11.8ms) Completed 200 OK in 27ms (Views: 13.8ms | ActiveRecord: 1.3ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:50:51 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:50:51 +0400 2012 Served asset /attachments.css - 304 Not Modified (0ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:50:51 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:50:55 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part3.pdf">} WARNING: Can't verify CSRF token authenticity Completed 500 Internal Server Error in 64ms ActionView::MissingTemplate (Missing template documents/nothing, application/nothing with {:locale=>[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip], :handlers=>[:builder, :erb]}. Searched in: * "/home/alex/simple_attachments/test/app/views" ): actionpack (3.2.2) lib/action_view/path_set.rb:58:in `find' actionpack (3.2.2) lib/action_view/lookup_context.rb:109:in `find_template' actionpack (3.2.2) lib/action_view/renderer/abstract_renderer.rb:3:in `__send__' actionpack (3.2.2) lib/action_view/renderer/abstract_renderer.rb:3:in `find_template' actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:29:in `determine_template' actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:10:in `render' actionpack (3.2.2) lib/action_view/renderer/renderer.rb:36:in `render_template' actionpack (3.2.2) lib/action_view/renderer/renderer.rb:17:in `render' actionpack (3.2.2) lib/abstract_controller/rendering.rb:109:in `_render_template' actionpack (3.2.2) lib/action_controller/metal/streaming.rb:225:in `_render_template' actionpack (3.2.2) lib/abstract_controller/rendering.rb:103:in `render_to_body' actionpack (3.2.2) lib/action_controller/metal/renderers.rb:28:in `render_to_body' actionpack (3.2.2) lib/action_controller/metal/compatibility.rb:50:in `render_to_body' actionpack (3.2.2) lib/abstract_controller/rendering.rb:88:in `render' actionpack (3.2.2) lib/action_controller/metal/rendering.rb:16:in `render' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:40:in `render' activesupport (3.2.2) lib/active_support/core_ext/benchmark.rb:5:in `ms' /usr/lib64/ruby/1.8/benchmark.rb:308:in `realtime' activesupport (3.2.2) lib/active_support/core_ext/benchmark.rb:5:in `ms' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:40:in `render' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:39:in `render' /home/alex/simple_attachments/lib/simple_attachments/attachments_controller.rb:93:in `handle_unverified_request' actionpack (3.2.2) lib/action_controller/metal/request_forgery_protection.rb:78:in `verify_authenticity_token' activesupport (3.2.2) lib/active_support/callbacks.rb:407:in `_run__2110466507__process_action__1623385099__callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.2) lib/abstract_controller/callbacks.rb:17:in `process_action' actionpack (3.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action' activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument' activesupport (3.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument' actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:29:in `process_action' actionpack (3.2.2) lib/action_controller/metal/params_wrapper.rb:205:in `process_action' activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action' actionpack (3.2.2) lib/abstract_controller/base.rb:121:in `process' actionpack (3.2.2) lib/abstract_controller/rendering.rb:45:in `process' actionpack (3.2.2) lib/action_controller/metal.rb:203:in `dispatch' actionpack (3.2.2) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' actionpack (3.2.2) lib/action_controller/metal.rb:246:in `action' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `call' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `dispatch' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:30:in `call' journey (1.0.3) lib/journey/router.rb:68:in `call' journey (1.0.3) lib/journey/router.rb:56:in `each' journey (1.0.3) lib/journey/router.rb:56:in `call' actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' rack (1.4.1) lib/rack/etag.rb:23:in `call' rack (1.4.1) lib/rack/conditionalget.rb:35:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/head.rb:14:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/params_parser.rb:21:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/flash.rb:242:in `call' rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context' rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/cookies.rb:338:in `call' activerecord (3.2.2) lib/active_record/query_cache.rb:64:in `call' activerecord (3.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in `call' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `_run__397314981__call__4__callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `send' activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call' rack (1.4.1) lib/rack/sendfile.rb:102:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app' railties (3.2.2) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' rack (1.4.1) lib/rack/runtime.rb:17:in `call' activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.1) lib/rack/lock.rb:15:in `call' actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call' rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward' rack-cache (1.1) lib/rack/cache/context.rb:139:in `pass' rack-cache (1.1) lib/rack/cache/context.rb:151:in `invalidate' rack-cache (1.1) lib/rack/cache/context.rb:70:in `call!' rack-cache (1.1) lib/rack/cache/context.rb:50:in `call' railties (3.2.2) lib/rails/engine.rb:479:in `call' railties (3.2.2) lib/rails/application.rb:220:in `call' rack (1.4.1) lib/rack/content_length.rb:14:in `call' railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call' rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run' rack (1.4.1) lib/rack/server.rb:265:in `start' railties (3.2.2) lib/rails/commands/server.rb:70:in `start' railties (3.2.2) lib/rails/commands.rb:55 railties (3.2.2) lib/rails/commands.rb:50:in `tap' railties (3.2.2) lib/rails/commands.rb:50 /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require' /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require' script/rails:6 Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:51:38 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (51.3ms) Completed 200 OK in 73ms (Views: 67.3ms | ActiveRecord: 1.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:51:38 +0400 2012 Served asset /attachments.js - 304 Not Modified (70ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:51:38 +0400 2012 Served asset /attachments.css - 304 Not Modified (5ms) Started GET "/avatars/12" for 127.0.0.1 at Sun Mar 04 23:51:38 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"12"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "12"]] Sent file /home/alex/simple_attachments/test/uploads/1330888133.62299.WIN.gif (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:51:41 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @content_type="application/pdf", @original_filename="shen-logic-part1.pdf">} WARNING: Can't verify CSRF token authenticity Rendered text template (0.0ms) Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.0ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (105.5ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (110.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (122.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (111.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (80.4ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (111.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (89.8ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:53:21 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (54.7ms) Completed 200 OK in 83ms (Views: 75.5ms | ActiveRecord: 1.8ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:53:22 +0400 2012 Compiled simple_attachments.js (0ms) (pid 2620) Compiled attachments.js (41ms) (pid 2620) Served asset /attachments.js - 200 OK (103ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:53:22 +0400 2012 Compiled simple_attachments.css (0ms) (pid 2620) Compiled attachments.css (149ms) (pid 2620) Served asset /attachments.css - 200 OK (168ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:53:22 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:53:22 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:22 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Rendered text template (0.0ms) Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.0ms)  (0.3ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.3ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (188.1ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 23:53:25 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 14ms (Views: 11.3ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:25 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (118.0ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 23:53:27 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.6ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 0.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 24ms (Views: 0.8ms | ActiveRecord: 0.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 10ms (Views: 0.7ms | ActiveRecord: 0.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:28 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 39ms (Views: 0.9ms | ActiveRecord: 0.0ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:53:29 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "users" VALUES(NULL)  (107.7ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sun Mar 04 23:53:33 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 14ms (Views: 11.9ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:33 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.0ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (114.1ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sun Mar 04 23:53:38 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 23ms (Views: 14.5ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:38 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (99.0ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sun Mar 04 23:53:44 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.6ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.6ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 22ms (Views: 12.9ms | ActiveRecord: 1.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:45 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.0ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 23:53:47 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"Feu3ecRH1gsWc5uo0mWWXG5W1JFbQTKa2hNV8emtclI=", "utf8"=>"✓", "id"=>"6", "file"=>""} User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction  (0.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 22ms (Views: 14.6ms | ActiveRecord: 1.9ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (95.8ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sun Mar 04 23:53:49 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 14ms (Views: 11.7ms | ActiveRecord: 0.5ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"  Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:49 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.0ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:49 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.0ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 0.0ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 9ms (Views: 1.0ms | ActiveRecord: 0.0ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:53:50 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"", "container_id"=>"null", "file"=>#, @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">} WARNING: Can't verify CSRF token authenticity Filter chain halted as :verify_authenticity_token rendered or redirected Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms) Started PUT "/users/7" for 127.0.0.1 at Sun Mar 04 23:53:52 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"iLqUXhPlDn4Cqa5pI8bh2TFihQr11j1CjDAgdQw0Ws8=", "utf8"=>"✓", "id"=>"7", "file"=>""} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.2ms) begin transaction  (0.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 19ms (Views: 9.7ms | ActiveRecord: 1.0ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (140.5ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (77.2ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.9ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:56:28 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (63.8ms) Completed 200 OK in 99ms (Views: 92.1ms | ActiveRecord: 1.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:56:28 +0400 2012 Served asset /attachments.js - 200 OK (21ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:56:29 +0400 2012 Served asset /attachments.css - 200 OK (6ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:56:29 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:56:29 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:29 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"aSUab9rYAwjjJO+bGhNuX5d2aDPBMtF7lUCIenRzQP0=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (22.7ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890989.73803.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (98.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (60.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 256ms (Views: 1.8ms | ActiveRecord: 182.3ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (113.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (75.8ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 23:56:31 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:56:32 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"zB7j+CnooNcVmDn2iDxsJxhFHDozTnIHBEe6DKBSUxw=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330890992.45693.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (79.0ms) commit transaction Completed 200 OK in 135ms (Views: 0.9ms | ActiveRecord: 79.4ms) Started GET "/avatars/1" for 127.0.0.1 at Sun Mar 04 23:56:32 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330890992.45693.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.3ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (72.1ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 23:56:36 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.6ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:36 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (2.7ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890996.98179.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (77.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (62.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 221ms (Views: 0.6ms | ActiveRecord: 143.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890997.33281.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (65.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (61.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 212ms (Views: 0.6ms | ActiveRecord: 128.1ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890997.6711.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (91.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (75.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 256ms (Views: 4.7ms | ActiveRecord: 167.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890998.10996.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (192.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (194.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 440ms (Views: 1.2ms | ActiveRecord: 388.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (3.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890998.76199.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (113.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (70.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 285ms (Views: 0.7ms | ActiveRecord: 187.3ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:39 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330890999.14516.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (70.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (62.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 155ms (Views: 0.5ms | ActiveRecord: 133.2ms) Started DELETE "/documents/2" for 127.0.0.1 at Sun Mar 04 23:56:41 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "id"=>"2"} Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (95.0ms) commit transaction Completed 200 OK in 117ms (Views: 0.7ms | ActiveRecord: 95.9ms) Started DELETE "/documents/3" for 127.0.0.1 at Sun Mar 04 23:56:41 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction SQL (3.9ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (59.2ms) commit transaction Completed 200 OK in 101ms (Views: 0.7ms | ActiveRecord: 63.5ms) Started DELETE "/documents/4" for 127.0.0.1 at Sun Mar 04 23:56:41 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "id"=>"4"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (70.1ms) commit transaction Completed 200 OK in 127ms (Views: 0.7ms | ActiveRecord: 70.6ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:42 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891002.0989.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (115.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (73.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 289ms (Views: 0.6ms | ActiveRecord: 189.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:56:42 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"l+ssRinhZfW+BzZTBM6ZLw24Cw1dy5VFk6LXmyQ4Bdo=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891002.49258.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (69.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (73.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 155ms (Views: 0.5ms | ActiveRecord: 143.4ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (97.1ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sun Mar 04 23:56:44 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:56:44 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"w/Cf/5R+Z8G2hpbEo1GA3KYUD6nLQhVWgiaxHECWXHY=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891004.89888.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (109.6ms) commit transaction Completed 200 OK in 116ms (Views: 0.5ms | ActiveRecord: 110.1ms) Started GET "/avatars/2" for 127.0.0.1 at Sun Mar 04 23:56:45 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test/uploads/1330891004.89888.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "users" VALUES(NULL)  (111.3ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sun Mar 04 23:56:47 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 13ms (Views: 10.7ms | ActiveRecord: 0.5ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:56:47 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"QbmTEeZrmfHZi0ccn9uGUHY1nWRSyL4mzffeYoP9cEE=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891007.45147.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (134.9ms) commit transaction Completed 200 OK in 153ms (Views: 1.0ms | ActiveRecord: 135.6ms) Started GET "/avatars/3" for 127.0.0.1 at Sun Mar 04 23:56:47 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330891007.45147.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:56:49 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"QbmTEeZrmfHZi0ccn9uGUHY1nWRSyL4mzffeYoP9cEE=", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (100.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (62.2ms) commit transaction  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (151.7ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (101.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (65.3ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (100.1ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:57:28 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (57.1ms) Completed 200 OK in 81ms (Views: 76.1ms | ActiveRecord: 1.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:57:28 +0400 2012 Served asset /attachments.js - 200 OK (6ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:57:28 +0400 2012 Served asset /attachments.css - 200 OK (7ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:57:29 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:57:29 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:29 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"I7xiynytyJpvlqeHv9umlnNLg40ph/Bhh3nNig4NiyM=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (22.0ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891049.35735.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (123.6ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (72.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 244ms (Views: 1.8ms | ActiveRecord: 218.4ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (77.5ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (74.9ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 23:57:31 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 17ms (Views: 14.6ms | ActiveRecord: 0.7ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:57:31 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"Kbwy80PhEuRVKrWG2/BZY3a3F5BsON0nwwkkjlt/V0Q=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891052.00842.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (106.9ms) commit transaction Completed 200 OK in 130ms (Views: 1.3ms | ActiveRecord: 107.5ms) Started GET "/avatars/1" for 127.0.0.1 at Sun Mar 04 23:57:32 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.7ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330891052.00842.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.7ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (109.9ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 23:57:36 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.6ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:36 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"/UJOj1sQKccDetSmj0R5BkOzbj9NjrMqt0IrZvZNrKA=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891056.46428.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (138.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (57.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 245ms (Views: 0.6ms | ActiveRecord: 196.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:36 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"/UJOj1sQKccDetSmj0R5BkOzbj9NjrMqt0IrZvZNrKA=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891056.83678.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (196.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (73.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 368ms (Views: 0.5ms | ActiveRecord: 270.5ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"/UJOj1sQKccDetSmj0R5BkOzbj9NjrMqt0IrZvZNrKA=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891057.31732.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (113.5ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (69.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 358ms (Views: 3.8ms | ActiveRecord: 184.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:37 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"/UJOj1sQKccDetSmj0R5BkOzbj9NjrMqt0IrZvZNrKA=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891057.86036.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (140.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (329.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 495ms (Views: 0.5ms | ActiveRecord: 471.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"/UJOj1sQKccDetSmj0R5BkOzbj9NjrMqt0IrZvZNrKA=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891058.49616.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (161.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (81.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 281ms (Views: 0.5ms | ActiveRecord: 243.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:57:38 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"/UJOj1sQKccDetSmj0R5BkOzbj9NjrMqt0IrZvZNrKA=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891058.91288.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (89.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (62.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 163ms (Views: 0.4ms | ActiveRecord: 152.8ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (136.2ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (99.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (99.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (88.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (63.8ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (66.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (66.4ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (113.0ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Sun Mar 04 23:58:51 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (59.2ms) Completed 200 OK in 91ms (Views: 83.3ms | ActiveRecord: 2.2ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Sun Mar 04 23:58:51 +0400 2012 Served asset /attachments.js - 200 OK (8ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Sun Mar 04 23:58:51 +0400 2012 Served asset /attachments.css - 200 OK (6ms) Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:58:51 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Sun Mar 04 23:58:51 +0400 2012 Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:51 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"RqbjIFF/mDD4DpdMSF0BgQwPfhi/KGPSKHoIhvHCgUs=", "container_id"=>"1", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (23.8ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891131.84617.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (124.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (72.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 249ms (Views: 1.8ms | ActiveRecord: 220.6ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (118.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (64.2ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Sun Mar 04 23:58:54 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 18ms (Views: 14.9ms | ActiveRecord: 0.9ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:54 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+Wxp2bxkyFdQSsEIhZPbmluCqoXvqb9eDHBLFfbPdJk=", "container_id"=>"2", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 0.5ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (113.8ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Sun Mar 04 23:58:56 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.7ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:57 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891137.26586.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (127.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (65.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 271ms (Views: 0.6ms | ActiveRecord: 193.8ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:57 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891137.6492.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (74.6ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (69.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 237ms (Views: 0.6ms | ActiveRecord: 145.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:58 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891138.07552.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (152.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (71.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 267ms (Views: 0.5ms | ActiveRecord: 225.2ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:58 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891138.7408.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (171.3ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (73.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 291ms (Views: 0.5ms | ActiveRecord: 245.3ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:59 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891139.14067.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (84.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (62.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 189ms (Views: 0.7ms | ActiveRecord: 148.4ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:58:59 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891139.46755.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (79.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (62.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 154ms (Views: 0.5ms | ActiveRecord: 143.0ms) Started DELETE "/documents/2" for 127.0.0.1 at Sun Mar 04 23:59:01 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "id"=>"2"} Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.4ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (105.7ms) commit transaction Completed 200 OK in 131ms (Views: 0.6ms | ActiveRecord: 106.6ms) Started DELETE "/documents/3" for 127.0.0.1 at Sun Mar 04 23:59:01 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction SQL (0.2ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (62.0ms) commit transaction Completed 200 OK in 102ms (Views: 1.6ms | ActiveRecord: 62.7ms) Started DELETE "/documents/4" for 127.0.0.1 at Sun Mar 04 23:59:01 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "id"=>"4"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (64.4ms) commit transaction Completed 200 OK in 80ms (Views: 0.5ms | ActiveRecord: 65.1ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:59:02 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891142.26432.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (165.4ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (74.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 285ms (Views: 0.7ms | ActiveRecord: 241.3ms) Started POST "/documents" for 127.0.0.1 at Sun Mar 04 23:59:02 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"+dVx/Ymqu5rNrqjHJmSWd42/sR4Gidvo3/4SMUMULqY=", "container_id"=>"3", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.4ms) begin transaction SQL (6.9ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330891142.684.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (89.1ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (73.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 187ms (Views: 0.5ms | ActiveRecord: 170.1ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (120.2ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Sun Mar 04 23:59:04 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 19ms (Views: 11.8ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:05 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"nhNn/uWN+pzf6NZEmxC3CpmGkJfPBskzCprL1+U1StY=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891145.18125.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (89.0ms) commit transaction Completed 200 OK in 109ms (Views: 1.1ms | ActiveRecord: 89.8ms) Started GET "/avatars/1" for 127.0.0.1 at Sun Mar 04 23:59:05 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330891145.18125.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (64.7ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Sun Mar 04 23:59:07 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 22ms (Views: 19.0ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:07 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"agjVc9iq6fqzuTRkQeznw7etzSTY1KnG20glST0Kr34=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891147.69313.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (104.0ms) commit transaction Completed 200 OK in 112ms (Views: 0.6ms | ActiveRecord: 104.5ms) Started GET "/avatars/2" for 127.0.0.1 at Sun Mar 04 23:59:07 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test/uploads/1330891147.69313.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:09 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"agjVc9iq6fqzuTRkQeznw7etzSTY1KnG20glST0Kr34=", "container_id"=>"null", "file"=>#, @original_filename="sample.pdf", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.pdf\"\r\nContent-Type: application/pdf\r\n">}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 8ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (92.4ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Sun Mar 04 23:59:11 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 0.6ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:12 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"GWkfU2nXXXbLIsXlF6CGD/B1jpD8YTSOThyofkcw+kI=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891152.24279.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (79.8ms) commit transaction Completed 200 OK in 88ms (Views: 0.7ms | ActiveRecord: 80.3ms) Started GET "/avatars/3" for 127.0.0.1 at Sun Mar 04 23:59:12 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330891152.24279.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 23:59:14 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"GWkfU2nXXXbLIsXlF6CGD/B1jpD8YTSOThyofkcw+kI=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.2ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 3  (96.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 124ms (Views: 9.2ms | ActiveRecord: 98.0ms) Started GET "/avatars/3" for 127.0.0.1 at Sun Mar 04 23:59:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330891152.24279.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:14 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"GWkfU2nXXXbLIsXlF6CGD/B1jpD8YTSOThyofkcw+kI=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891154.83959.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (95.4ms) commit transaction Completed 200 OK in 103ms (Views: 0.5ms | ActiveRecord: 96.0ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 23:59:14 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330891154.83959.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Sun Mar 04 23:59:16 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"GWkfU2nXXXbLIsXlF6CGD/B1jpD8YTSOThyofkcw+kI=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 SQL (0.4ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 4  (111.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 139ms (Views: 11.1ms | ActiveRecord: 113.9ms) Started GET "/avatars/4" for 127.0.0.1 at Sun Mar 04 23:59:17 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330891154.83959.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (74.4ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Sun Mar 04 23:59:17 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.5ms) Avatar Load (13.4ms) SELECT "avatars".* FROM "avatars"  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (78.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (75.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (64.5ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:18 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891158.04426.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (83.3ms) commit transaction Completed 200 OK in 109ms (Views: 3.2ms | ActiveRecord: 83.8ms) Started GET "/avatars/5" for 127.0.0.1 at Sun Mar 04 23:59:18 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330891158.04426.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:18 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891158.44159.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (158.8ms) commit transaction Completed 200 OK in 207ms (Views: 0.6ms | ActiveRecord: 159.2ms) Started GET "/avatars/6" for 127.0.0.1 at Sun Mar 04 23:59:18 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test/uploads/1330891158.44159.sample.jpg (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:18 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891158.85135.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (199.6ms) commit transaction Completed 200 OK in 215ms (Views: 0.6ms | ActiveRecord: 200.1ms) Started GET "/avatars/7" for 127.0.0.1 at Sun Mar 04 23:59:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test/uploads/1330891158.85135.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:19 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891159.3765.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (111.3ms) commit transaction Completed 200 OK in 134ms (Views: 0.6ms | ActiveRecord: 111.8ms) Started GET "/avatars/8" for 127.0.0.1 at Sun Mar 04 23:59:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test/uploads/1330891159.3765.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:19 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "container_id"=>"null", "file"=>#, @original_filename="sample.jpg", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.jpg\"\r\nContent-Type: image/jpeg\r\n">}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330891159.79503.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (100.2ms) commit transaction Completed 200 OK in 116ms (Views: 0.6ms | ActiveRecord: 100.8ms) Started GET "/avatars/9" for 127.0.0.1 at Sun Mar 04 23:59:19 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test/uploads/1330891159.79503.sample.jpg (0.1ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Started POST "/avatars" for 127.0.0.1 at Sun Mar 04 23:59:20 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "container_id"=>"null", "file"=>#, @original_filename="sample.png", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"sample.png\"\r\nContent-Type: image/png\r\n">}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330891160.15479.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (107.2ms) commit transaction Completed 200 OK in 114ms (Views: 0.5ms | ActiveRecord: 107.6ms) Started GET "/avatars/10" for 127.0.0.1 at Sun Mar 04 23:59:20 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330891160.15479.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/7" for 127.0.0.1 at Sun Mar 04 23:59:22 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"EINpRQjlpP8CP5wZrwYJd45WQimH9n/6k5dI4uLchxM=", "utf8"=>"✓", "id"=>"7", "file"=>"", "user"=>{"avatar_"=>"10"}} User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.2ms) begin transaction Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 10 LIMIT 1 Avatar Load (0.5ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 7 WHERE "avatars"."id" = 10  (112.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 137ms (Views: 9.9ms | ActiveRecord: 114.6ms) Started GET "/avatars/10" for 127.0.0.1 at Sun Mar 04 23:59:22 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330891160.15479.sample.png (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.3ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (245.4ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.1ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (89.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (89.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (63.0ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.5ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (111.8ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Mon Mar 05 02:26:43 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (66.9ms) Completed 200 OK in 103ms (Views: 93.7ms | ActiveRecord: 2.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:43 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:43 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error Started GET "/favicon.ico" for 127.0.0.1 at Mon Mar 05 02:26:44 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Mon Mar 05 02:26:44 +0400 2012 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (141.2ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Mon Mar 05 02:26:46 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:46 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:46 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (88.0ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Mon Mar 05 02:26:49 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.6ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 17ms (Views: 13.2ms | ActiveRecord: 1.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:49 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:49 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (88.8ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Mon Mar 05 02:26:51 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 17ms (Views: 14.4ms | ActiveRecord: 0.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:51 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:51 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "users" VALUES(NULL)  (109.2ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Mon Mar 05 02:26:53 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 0.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:53 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:53 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (108.1ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Mon Mar 05 02:26:56 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 17ms (Views: 13.3ms | ActiveRecord: 0.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:56 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:56 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (102.8ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Mon Mar 05 02:26:58 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:26:58 +0400 2012 Error compiling asset attachments.js: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/javascripts/attachments.js:2) Served asset /attachments.js - 500 Internal Server Error Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:26:58 +0400 2012 Error compiling asset attachments.css: Sprockets::FileNotFound: couldn't find file 'simple_attachments' (in /home/alex/simple_attachments/test/app/assets/stylesheets/attachments.css:2) Served asset /attachments.css - 500 Internal Server Error Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" Started GET "/users/1/edit" for 127.0.0.1 at Mon Mar 05 02:31:05 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.1ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (35.7ms) Completed 200 OK in 127ms (Views: 121.5ms | ActiveRecord: 1.3ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:31:06 +0400 2012 Compiled simple_attachments.js (0ms) (pid 5428) Compiled attachments.js (20ms) (pid 5428) Served asset /attachments.js - 200 OK (25ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:31:06 +0400 2012 Compiled simple_attachments.css (0ms) (pid 5428) Compiled attachments.css (10ms) (pid 5428) Served asset /attachments.css - 200 OK (15ms)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.1ms) select sqlite_version(*)  (127.7ms) CREATE TABLE "avatars" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)   (88.2ms) CREATE TABLE "documents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "filepath" varchar(255) NOT NULL, "mimetype" varchar(255) NOT NULL, "filename" varchar(255) NOT NULL, "filesize" integer NOT NULL)  (100.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)   (100.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.1ms) PRAGMA index_list("schema_migrations")  (100.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (82.5ms) INSERT INTO "schema_migrations" (version) VALUES ('3')  (77.4ms) INSERT INTO "schema_migrations" (version) VALUES ('2')  (77.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1') Document Load (0.2ms) SELECT "documents".* FROM "documents"   (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (99.4ms) commit transaction Started GET "/users/1/edit" for 127.0.0.1 at Mon Mar 05 02:34:18 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"1"} User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 1 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 1 Rendered users/edit.html.erb within layouts/application (189.2ms) Completed 200 OK in 224ms (Views: 199.4ms | ActiveRecord: 19.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:18 +0400 2012 Compiled simple_attachments.js (1ms) (pid 5447) Compiled attachments.js (3ms) (pid 5447) Served asset /attachments.js - 200 OK (23ms) Started GET "/assets/attachments.css" for 127.0.0.1 at Mon Mar 05 02:34:19 +0400 2012 Served asset /attachments.css - 200 OK (7ms) Started GET "/favicon.ico" for 127.0.0.1 at Mon Mar 05 02:34:19 +0400 2012 Started GET "/favicon.ico" for 127.0.0.1 at Mon Mar 05 02:34:19 +0400 2012 Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:19 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"3Vb8yNwqh7swXHl/QEQZFc2V4nGkyjtFC+egHg4HK6A=", "container_id"=>"1", "file"=>#>}  (0.1ms) begin transaction SQL (112.5ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900459.62755.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (136.5ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 1 WHERE "documents"."id" = 1  (71.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Rendered text template (0.0ms) Completed 200 OK in 345ms (Views: 2.0ms | ActiveRecord: 321.1ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 1 Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 1]]  (100.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "users" VALUES(NULL)  (64.5ms) commit transaction Started GET "/users/2/edit" for 127.0.0.1 at Mon Mar 05 02:34:21 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"2"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 2 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 2 Completed 200 OK in 14ms (Views: 11.5ms | ActiveRecord: 0.6ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:22 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"JYNRCCNbaozcRAwSud0fi/hYOg/rlrJ8amxv9KsXFUE=", "container_id"=>"2", "file"=>#>}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.3ms) commit transaction Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 0.7ms) Document Load (0.2ms) SELECT "documents".* FROM "documents"  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "users" VALUES(NULL)  (103.1ms) commit transaction Started GET "/users/3/edit" for 127.0.0.1 at Mon Mar 05 02:34:24 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"3"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 3 LIMIT 1 Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 3 Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 0.7ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:24 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:24 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900464.71052.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (123.0ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 2  (67.7ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 416ms (Views: 0.7ms | ActiveRecord: 192.0ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:25 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900465.25569.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (137.3ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 3  (72.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 351ms (Views: 0.7ms | ActiveRecord: 210.8ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:25 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900465.73901.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (77.5ms) commit transaction User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction  (0.7ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 4  (78.4ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 268ms (Views: 0.8ms | ActiveRecord: 157.7ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900466.37214.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (99.0ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 5  (81.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 226ms (Views: 4.9ms | ActiveRecord: 182.2ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:26 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900466.77443.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (193.9ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 6  (80.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 370ms (Views: 0.6ms | ActiveRecord: 275.0ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:27 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900467.32831.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (165.2ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 7  (72.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 251ms (Views: 0.5ms | ActiveRecord: 238.9ms) Started DELETE "/documents/2" for 127.0.0.1 at Mon Mar 05 02:34:29 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "id"=>"2"} Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "2"]]  (0.1ms) begin transaction SQL (0.5ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 2]]  (118.3ms) commit transaction Completed 200 OK in 143ms (Views: 1.0ms | ActiveRecord: 119.3ms) Started DELETE "/documents/3" for 127.0.0.1 at Mon Mar 05 02:34:29 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "id"=>"3"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "3"]]  (0.2ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 3]]  (78.1ms) commit transaction Completed 200 OK in 94ms (Views: 0.6ms | ActiveRecord: 78.7ms) Started DELETE "/documents/4" for 127.0.0.1 at Mon Mar 05 02:34:29 +0400 2012 Processing by DocumentsController#destroy as */* Parameters: {"authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "id"=>"4"} Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."id" = ? LIMIT 1 [["id", "4"]]  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "documents" WHERE "documents"."id" = ? [["id", 4]]  (82.1ms) commit transaction Completed 200 OK in 97ms (Views: 0.7ms | ActiveRecord: 82.8ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:30 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900470.07702.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (99.8ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 8  (82.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 258ms (Views: 0.6ms | ActiveRecord: 182.9ms) Started POST "/documents" for 127.0.0.1 at Mon Mar 05 02:34:30 +0400 2012 Processing by DocumentsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"documents", "authenticity_token"=>"ozoqCG56r5tAsHKOXJoCRM9SAED48UvR5z/aD01bVfI=", "container_id"=>"3", "file"=>#>}  (0.5ms) begin transaction SQL (0.3ms) INSERT INTO "documents" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.pdf"], ["filepath", "1330900470.48767.sample.pdf"], ["filesize", 7134], ["mimetype", "application/pdf"], ["user_id", nil]]  (73.7ms) commit transaction User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "documents" SET "user_id" = 3 WHERE "documents"."id" = 9  (73.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 160ms (Views: 0.4ms | ActiveRecord: 148.6ms)  (0.2ms) SELECT COUNT(*) FROM "documents" WHERE "documents"."user_id" = 3  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (116.0ms) commit transaction Started GET "/users/4/edit" for 127.0.0.1 at Mon Mar 05 02:34:32 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"4"} User Load (9.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "4"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 4 LIMIT 1 Document Load (0.6ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 4 Completed 200 OK in 32ms (Views: 16.3ms | ActiveRecord: 10.5ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:32 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:33 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"pdN7QlOrYXLxzTB1OvSWCNKmir+s2mXrHQvRAc0mpL4=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900473.16581.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (95.2ms) commit transaction Completed 200 OK in 116ms (Views: 1.0ms | ActiveRecord: 95.8ms) Started GET "/avatars/1" for 127.0.0.1 at Mon Mar 05 02:34:33 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"1"} Avatar Load (0.4ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "1"]] Sent file /home/alex/simple_attachments/test/uploads/1330900473.16581.sample.jpg (0.2ms) Completed 200 OK in 5ms (ActiveRecord: 0.4ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (98.5ms) commit transaction Started GET "/users/5/edit" for 127.0.0.1 at Mon Mar 05 02:34:35 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"5"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "5"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 5 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 5 Completed 200 OK in 14ms (Views: 11.0ms | ActiveRecord: 0.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:35 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:35 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"IEUAnBAq8phjs8Z1/0/q7EONCW0yPvuTQ5dEvqgU3Cc=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900475.71905.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (80.8ms) commit transaction Completed 200 OK in 101ms (Views: 0.5ms | ActiveRecord: 81.2ms) Started GET "/avatars/2" for 127.0.0.1 at Mon Mar 05 02:34:35 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"2"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "2"]] Sent file /home/alex/simple_attachments/test/uploads/1330900475.71905.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:37 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"IEUAnBAq8phjs8Z1/0/q7EONCW0yPvuTQ5dEvqgU3Cc=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 18ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (107.0ms) commit transaction Started GET "/users/6/edit" for 127.0.0.1 at Mon Mar 05 02:34:40 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"6"} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]] Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 Document Load (0.4ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 19ms (Views: 14.9ms | ActiveRecord: 0.9ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:40 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:40 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DihGkFXO/I6oo0xSz42oFWcx21ib91wB707kUP/Y7lg=", "container_id"=>"null", "file"=>#>}  (0.2ms) begin transaction SQL (8.0ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900480.42599.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (97.9ms) commit transaction Completed 200 OK in 117ms (Views: 0.5ms | ActiveRecord: 106.1ms) Started GET "/avatars/3" for 127.0.0.1 at Mon Mar 05 02:34:40 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330900480.42599.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Mon Mar 05 02:34:42 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"DihGkFXO/I6oo0xSz42oFWcx21ib91wB707kUP/Y7lg=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"3"}} User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 3  (132.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 162ms (Views: 12.9ms | ActiveRecord: 134.1ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:42 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started GET "/avatars/3" for 127.0.0.1 at Mon Mar 05 02:34:42 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"3"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "3"]] Sent file /home/alex/simple_attachments/test/uploads/1330900480.42599.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:43 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"DihGkFXO/I6oo0xSz42oFWcx21ib91wB707kUP/Y7lg=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900483.07866.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (140.0ms) commit transaction Completed 200 OK in 147ms (Views: 0.5ms | ActiveRecord: 140.4ms) Started GET "/avatars/4" for 127.0.0.1 at Mon Mar 05 02:34:43 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330900483.07866.sample.jpg (0.2ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" ORDER BY "avatars"."id" DESC LIMIT 1 Started PUT "/users/6" for 127.0.0.1 at Mon Mar 05 02:34:45 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"DihGkFXO/I6oo0xSz42oFWcx21ib91wB707kUP/Y7lg=", "utf8"=>"✓", "id"=>"6", "file"=>"", "user"=>{"avatar_"=>"4"}} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "6"]]  (0.1ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 4 LIMIT 1 Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 6 LIMIT 1 SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 3]]  (0.3ms) UPDATE "avatars" SET "user_id" = 6 WHERE "avatars"."id" = 4  (420.4ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 6 Completed 200 OK in 484ms (Views: 19.8ms | ActiveRecord: 422.0ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:45 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started GET "/avatars/4" for 127.0.0.1 at Mon Mar 05 02:34:45 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"4"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "4"]] Sent file /home/alex/simple_attachments/test/uploads/1330900483.07866.sample.jpg (0.1ms) Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Avatar Exists (0.2ms) SELECT 1 FROM "avatars" WHERE "avatars"."id" = 3 LIMIT 1  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "users" VALUES(NULL)  (117.9ms) commit transaction Started GET "/users/7/edit" for 127.0.0.1 at Mon Mar 05 02:34:46 +0400 2012 Processing by UsersController#edit as HTML Parameters: {"id"=>"7"} User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]] Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1 Document Load (0.2ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 19ms (Views: 15.9ms | ActiveRecord: 0.6ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:46 +0400 2012 Served asset /attachments.js - 304 Not Modified (9ms) Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars"  (0.1ms) begin transaction SQL (0.3ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 1]]  (97.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 2]]  (75.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) DELETE FROM "avatars" WHERE "avatars"."id" = ? [["id", 4]]  (64.6ms) commit transaction Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:46 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900486.92727.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (153.1ms) commit transaction Completed 200 OK in 186ms (Views: 4.3ms | ActiveRecord: 153.5ms) Started GET "/avatars/5" for 127.0.0.1 at Mon Mar 05 02:34:47 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"5"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "5"]] Sent file /home/alex/simple_attachments/test/uploads/1330900486.92727.sample.jpg (0.2ms) Completed 200 OK in 13ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:47 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "container_id"=>"null", "file"=>#>}  (16.5ms) begin transaction SQL (0.2ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900487.4311.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (140.3ms) commit transaction Completed 200 OK in 171ms (Views: 0.6ms | ActiveRecord: 157.0ms) Started GET "/avatars/6" for 127.0.0.1 at Mon Mar 05 02:34:47 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"6"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "6"]] Sent file /home/alex/simple_attachments/test/uploads/1330900487.4311.sample.jpg (0.1ms) Completed 200 OK in 12ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:47 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900488.03152.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (108.9ms) commit transaction Completed 200 OK in 175ms (Views: 9.4ms | ActiveRecord: 109.3ms) Started GET "/avatars/7" for 127.0.0.1 at Mon Mar 05 02:34:48 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"7"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "7"]] Sent file /home/alex/simple_attachments/test/uploads/1330900488.03152.sample.jpg (0.2ms) Completed 200 OK in 11ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:48 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900488.43945.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (116.1ms) commit transaction Completed 200 OK in 143ms (Views: 0.6ms | ActiveRecord: 116.5ms) Started GET "/avatars/8" for 127.0.0.1 at Mon Mar 05 02:34:48 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"8"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "8"]] Sent file /home/alex/simple_attachments/test/uploads/1330900488.43945.sample.jpg (0.1ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:48 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.jpg"], ["filepath", "1330900489.01433.sample.jpg"], ["filesize", 1969], ["mimetype", "image/jpeg"], ["user_id", nil]]  (135.8ms) commit transaction Completed 200 OK in 194ms (Views: 0.7ms | ActiveRecord: 136.2ms) Started GET "/avatars/9" for 127.0.0.1 at Mon Mar 05 02:34:49 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"9"} Avatar Load (0.1ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "9"]] Sent file /home/alex/simple_attachments/test/uploads/1330900489.01433.sample.jpg (0.1ms) Completed 200 OK in 8ms (ActiveRecord: 0.1ms) Started POST "/avatars" for 127.0.0.1 at Mon Mar 05 02:34:49 +0400 2012 Processing by AvatarsController#create as HTML Parameters: {"container_model"=>"user", "method"=>"avatar", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "container_id"=>"null", "file"=>#>}  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "avatars" ("filename", "filepath", "filesize", "mimetype", "user_id") VALUES (?, ?, ?, ?, ?) [["filename", "sample.png"], ["filepath", "1330900489.43854.sample.png"], ["filesize", 2635], ["mimetype", "image/png"], ["user_id", nil]]  (127.8ms) commit transaction Completed 200 OK in 136ms (Views: 0.5ms | ActiveRecord: 128.2ms) Started GET "/avatars/10" for 127.0.0.1 at Mon Mar 05 02:34:49 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330900489.43854.sample.png (0.2ms) Completed 200 OK in 3ms (ActiveRecord: 0.2ms) Started PUT "/users/7" for 127.0.0.1 at Mon Mar 05 02:34:51 +0400 2012 Processing by UsersController#update as HTML Parameters: {"commit"=>"Update User", "authenticity_token"=>"mDQl7ZdaMk7RfZ7xlIMvyNG0yzczUN5FPPa9GmGTBzk=", "utf8"=>"✓", "id"=>"7", "file"=>"", "user"=>{"avatar_"=>"10"}} User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "7"]]  (0.2ms) begin transaction Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = 10 LIMIT 1 Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1  (0.3ms) UPDATE "avatars" SET "user_id" = 7 WHERE "avatars"."id" = 10  (96.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Document Load (0.3ms) SELECT "documents".* FROM "documents" WHERE "documents"."user_id" = 7 Completed 200 OK in 128ms (Views: 12.9ms | ActiveRecord: 98.4ms) Started GET "/assets/attachments.js" for 127.0.0.1 at Mon Mar 05 02:34:51 +0400 2012 Served asset /attachments.js - 304 Not Modified (0ms) Started GET "/avatars/10" for 127.0.0.1 at Mon Mar 05 02:34:51 +0400 2012 Processing by AvatarsController#show as HTML Parameters: {"id"=>"10"} Avatar Load (0.2ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."id" = ? LIMIT 1 [["id", "10"]] Sent file /home/alex/simple_attachments/test/uploads/1330900489.43854.sample.png (0.1ms) Completed 200 OK in 4ms (ActiveRecord: 0.2ms) Avatar Load (0.3ms) SELECT "avatars".* FROM "avatars" WHERE "avatars"."user_id" = 7 LIMIT 1