spec/dummy/log/test.log in token_field-0.0.1 vs spec/dummy/log/test.log in token_field-0.0.2
- old
+ new
@@ -5934,5 +5934,1518 @@
[1m[36m (1.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
[1m[35m (1.0ms)[0m DELETE FROM "products";
[1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
[1m[35m (22.4ms)[0m DELETE FROM "product_has_categories";
[1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (7.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00]]
+ [1m[36m (1.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.8ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (22.9ms)[0m DELETE FROM "products";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (11.9ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[35m (3.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[36m (2.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[35m (0.8ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:12:53 +0200
+Processing by ItemsController#new as HTML
+Completed 500 Internal Server Error in 2ms
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.1ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (3.6ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (2.5ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.3ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (1.8ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[35m (7.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[36m (3.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:13:02 +0200
+Processing by ItemsController#new as HTML
+Completed 500 Internal Server Error in 1ms
+ [1m[36m (2.2ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (1.1ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00]]
+ [1m[36m (1.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
+Migrating to CreateCategories (20121012100526)
+Migrating to CreateProducts (20121012235444)
+Migrating to CreateProductHasCategories (20121012235509)
+Migrating to CreateItems (20121013214019)
+ [1m[35m (0.0ms)[0m select sqlite_version(*)
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.4ms)[0m CREATE TABLE "items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "category_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
+ [1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20121013214019')[0m
+ [1m[35m (2.3ms)[0m commit transaction
+ [1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
+ [1m[36m (0.0ms)[0m [1mPRAGMA index_list("categories")[0m
+ [1m[35m (0.0ms)[0m PRAGMA index_list("items")
+ [1m[36m (0.0ms)[0m [1mPRAGMA index_list("product_has_categories")[0m
+ [1m[35m (0.0ms)[0m PRAGMA index_list("products")
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (4.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00]]
+ [1m[36m (2.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:13:23 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (67.4ms)
+ Rendered items/new.html.erb within layouts/application (72.5ms)
+Completed 200 OK in 121ms (Views: 113.9ms | ActiveRecord: 0.5ms)
+
+
+Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:13:24 +0200
+Compiled token-input-facebook.css (0ms) (pid 17853)
+Compiled application.css (7ms) (pid 17853)
+Served asset /application.css - 200 OK (15ms)
+
+
+Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:13:24 +0200
+Compiled jquery.js (4ms) (pid 17853)
+Compiled jquery_ujs.js (0ms) (pid 17853)
+Compiled jquery.tokeninput.js (26ms) (pid 17853)
+Compiled application.js (44ms) (pid 17853)
+Served asset /application.js - 200 OK (53ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:13:24 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"shoes"}
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
+Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.9ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]
+ [1m[36m (1.2ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:52870/items
+Completed 302 Found in 8ms (ActiveRecord: 2.2ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items"
+ Rendered items/index.html.erb within layouts/application (1.4ms)
+Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.1ms)
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.8ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.1ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]
+ [1m[36m (1.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:13:25 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (3.7ms)
+Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]
+ [1m[35m (1.3ms)[0m commit transaction
+Redirected to http://www.example.com/items
+Completed 302 Found in 4ms (ActiveRecord: 1.8ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "items";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[35m (1.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[36m (15.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[35m (1.2ms)[0m commit transaction
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.1ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "categories";
+ [1m[36m (0.9ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.8ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[35m (1.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.3ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (5.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]
+ [1m[36m (2.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]
+ [1m[35m (1.3ms)[0m commit transaction
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:13:59 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" [0m
+ Rendered items/index.html.erb within layouts/application (28.6ms)
+Completed 200 OK in 39ms (Views: 37.7ms | ActiveRecord: 0.2ms)
+ [1m[35m (1.8ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.7ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (1.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00]]
+ [1m[35m (1.4ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:03 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (85.7ms)
+Completed 200 OK in 95ms (Views: 94.4ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:14:03 +0200
+Served asset /application.css - 200 OK (5ms)
+
+
+Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:14:03 +0200
+Served asset /application.js - 200 OK (7ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:14:03 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"shoes"}
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')[0m
+Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[35m (1.4ms)[0m commit transaction
+Redirected to http://127.0.0.1:52937/items
+Completed 302 Found in 5ms (ActiveRecord: 2.1ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.4ms)
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ [1m[35m (1.3ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (1.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[35m (1.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:04 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (3.9ms)
+Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[36m (1.6ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/items
+Completed 302 Found in 4ms (ActiveRecord: 2.1ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.8ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.8ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.5ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[36m (1.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.7ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]
+ [1m[36m (1.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:14:05 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ Rendered items/_form.html.erb (5.1ms)
+Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.3ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:14:05 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"skirt"}
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')
+Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:14:06 +0200
+Processing by ItemsController#update as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.3ms)[0m [1mUPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:14:06.454102' WHERE "items"."id" = 1[0m
+ [1m[35m (1.0ms)[0m commit transaction
+Redirected to http://127.0.0.1:52937/items
+Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:06 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)
+ [1m[35mItem Load (0.3ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (0.9ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (0.8ms)[0m DELETE FROM "products";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.8ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "items";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (4.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]
+ [1m[36m (2.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]
+ [1m[35m (1.2ms)[0m commit transaction
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:14:29 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ Rendered items/_form.html.erb (63.4ms)
+ Rendered items/edit.html.erb within layouts/application (70.4ms)
+Completed 200 OK in 85ms (Views: 82.2ms | ActiveRecord: 0.9ms)
+
+
+Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:14:29 +0200
+Served asset /application.css - 200 OK (5ms)
+
+
+Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:14:29 +0200
+Served asset /application.js - 200 OK (6ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:14:30 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"skirt"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:14:31 +0200
+Processing by ItemsController#update as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.4ms)[0m [1mUPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:14:31.234759' WHERE "items"."id" = 1[0m
+ [1m[35m (116.3ms)[0m commit transaction
+Redirected to http://127.0.0.1:53017/items
+Completed 302 Found in 122ms (ActiveRecord: 116.9ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.4ms)[0m [1mSELECT "items".* FROM "items" [0m
+ Rendered items/index.html.erb within layouts/application (1.6ms)
+Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.4ms)
+ [1m[35mItem Load (0.3ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1[0m
+ [1m[35m (33.4ms)[0m DELETE FROM "categories";
+ [1m[36m (2.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "products";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (3.9ms)
+Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[36m (1.9ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/items
+Completed 302 Found in 4ms (ActiveRecord: 2.3ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.8ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[36m (1.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[36m (4.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ Rendered items/_form.html.erb (5.0ms)
+Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#update as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.3ms)[0m UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:14:32.447777' WHERE "items"."id" = 1
+ [1m[36m (1.4ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/items
+Completed 302 Found in 4ms (ActiveRecord: 1.8ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.3ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[36m (1.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:32 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (4.9ms)
+Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:14:33 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"shoes"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:33 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:33 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:33 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:53017/items
+Completed 302 Found in 4ms (ActiveRecord: 1.6ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:33 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.4ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (1.4ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]
+ [1m[36m (1.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]
+ [1m[35m (1.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]
+ [1m[35m (1.2ms)[0m commit transaction
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:34 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms)
+ [1m[35m (0.9ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.8ms)[0m DELETE FROM "items";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (4.2ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[36m (2.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[35m (2.0ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[36m (1.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:19:19 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" [0m
+ Rendered items/index.html.erb within layouts/application (28.5ms)
+Completed 200 OK in 39ms (Views: 37.9ms | ActiveRecord: 0.2ms)
+ [1m[35m (1.4ms)[0m DELETE FROM "categories";
+ [1m[36m (0.9ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.6ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.7ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "items";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[35m (1.7ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[36m (1.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:19:19 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (99.7ms)
+Completed 500 Internal Server Error in 104ms
+ [1m[36m (1.9ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (2.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.8ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.8ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (2.1ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.8ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.7ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[36m (1.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]
+ [1m[36m (1.9ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:19:23 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (25.3ms)
+Completed 500 Internal Server Error in 27ms
+ [1m[35m (2.4ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:19:26 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ Rendered items/_form.html.erb (48.6ms)
+Completed 500 Internal Server Error in 52ms
+ [1m[35m (1.5ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]
+ [1m[35m (1.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:19:26 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ Rendered items/_form.html.erb (21.9ms)
+Completed 500 Internal Server Error in 24ms
+ [1m[35m (2.4ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "items";
+ [1m[36m (1.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (4.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00]]
+ [1m[36m (2.2ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:51 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories"
+ Rendered categories/index.html.erb within layouts/application (3.8ms)
+Completed 200 OK in 42ms (Views: 40.4ms | ActiveRecord: 0.1ms)
+ [1m[36m (1.4ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.1ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:20:55 +0200
+Processing by CategoriesController#new as HTML
+ Rendered categories/_form.html.erb (19.2ms)
+Completed 200 OK in 66ms (Views: 65.4ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:20:55 +0200
+Served asset /application.css - 200 OK (6ms)
+
+
+Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:20:55 +0200
+Served asset /application.js - 200 OK (7ms)
+
+
+Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-14 00:20:56 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"wood"}
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%')
+Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.5ms)
+
+
+Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:20:56 +0200
+Processing by CategoriesController#create as HTML
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:56 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:56 UTC +00:00]]
+ [1m[36m (60.7ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:53294/categories
+Completed 302 Found in 64ms (ActiveRecord: 61.4ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.2ms)
+ [1m[36mCategory Load (0.3ms)[0m [1mSELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (1.4ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.1ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.8ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[36m (1.5ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#new as HTML
+ Rendered categories/_form.html.erb (4.1ms)
+Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#create as HTML
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+Redirected to http://www.example.com/categories
+Completed 302 Found in 4ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#index as HTML
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" [0m
+Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms)
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.2ms)[0m DELETE FROM "products";
+ [1m[36m (0.6ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "items";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[35m (1.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+
+
+Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#edit as HTML
+ Parameters: {"id"=>"3"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ Rendered categories/_form.html.erb (4.0ms)
+Completed 200 OK in 49ms (Views: 47.2ms | ActiveRecord: 0.4ms)
+
+
+Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#update as HTML
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"}
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.3ms)[0m UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:20:57.336934' WHERE "categories"."id" = 3
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/categories
+Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 3]]
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+
+
+Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:20:57 +0200
+Processing by CategoriesController#edit as HTML
+ Parameters: {"id"=>"3"}
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", "3"]]
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ Rendered categories/_form.html.erb (5.8ms)
+Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)
+
+
+Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-14 00:20:58 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"new parent"}
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%')[0m
+Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:20:58 +0200
+Processing by CategoriesController#update as HTML
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"}
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.4ms)[0m UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:20:58.872293' WHERE "categories"."id" = 3
+ [1m[36m (0.7ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:53294/categories
+Completed 302 Found in 4ms (ActiveRecord: 1.3ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:58 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms)
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 3]]
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.6ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[36m (1.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[36m (1.6ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 00:20:59 +0200
+Processing by ProductsController#index as HTML
+ [1m[35mProduct Load (0.2ms)[0m SELECT "products".* FROM "products"
+ [1m[36m (0.2ms)[0m [1mSELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+Completed 200 OK in 18ms (Views: 16.7ms | ActiveRecord: 0.3ms)
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (1.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "products";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "items";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[35m (1.3ms)[0m commit transaction
+ [1m[36m (28.8ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[36m (1.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+
+
+Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:20:59 +0200
+Processing by ProductsController#new as HTML
+ [1m[36m (0.1ms)[0m [1mSELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL
+ Rendered products/_form.html.erb (7.9ms)
+Completed 200 OK in 20ms (Views: 10.2ms | ActiveRecord: 0.6ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:20:59 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"shoes"}
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')[0m
+Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)
+
+
+Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-14 00:21:01 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"pents"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%')
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/products" for 127.0.0.1 at 2012-10-14 00:21:01 +0200
+Processing by ProductsController#create as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"}
+ [1m[36mCategory Load (0.3ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00]]
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+Redirected to http://127.0.0.1:53294/products
+Completed 302 Found in 11ms (ActiveRecord: 2.7ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:01 +0200
+Processing by ProductsController#index as HTML
+ [1m[36mProduct Load (0.1ms)[0m [1mSELECT "products".* FROM "products" [0m
+ [1m[35m (0.1ms)[0m SELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.4ms)
+ [1m[36mProduct Load (0.2ms)[0m [1mSELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.3ms)[0m SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ [1m[36m (1.4ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.3ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#new as HTML
+ [1m[35m (0.2ms)[0m SELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL
+ [1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL[0m
+ Rendered products/_form.html.erb (6.5ms)
+Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.4ms)
+
+
+Started POST "/products" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#create as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36m (1.2ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/products
+Completed 302 Found in 8ms (ActiveRecord: 2.4ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#index as HTML
+ [1m[35mProduct Load (0.2ms)[0m SELECT "products".* FROM "products"
+ [1m[36m (0.3ms)[0m [1mSELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.5ms)
+ [1m[35mProduct Load (0.2ms)[0m SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (0.9ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "products";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (1.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.5ms)[0m DELETE FROM "items";
+ [1m[36m (0.6ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (1.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+
+
+Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[36mProduct Load (0.2ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.3ms)[0m SELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ [1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+ [1m[35mCategory Load (0.3ms)[0m SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ Rendered products/_form.html.erb (9.0ms)
+Completed 200 OK in 13ms (Views: 11.1ms | ActiveRecord: 1.0ms)
+
+
+Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#update as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"}
+ [1m[36mProduct Load (0.1ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/products
+Completed 302 Found in 27ms (ActiveRecord: 2.2ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#index as HTML
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products"
+ [1m[36m (0.1ms)[0m [1mSELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms)
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.2ms)[0m DELETE FROM "products";
+ [1m[36m (1.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.8ms)[0m DELETE FROM "items";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+
+
+Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:21:02 +0200
+Processing by ProductsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[36mProduct Load (0.3ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.2ms)[0m SELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ [1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ Rendered products/_form.html.erb (8.0ms)
+Completed 200 OK in 12ms (Views: 9.4ms | ActiveRecord: 0.8ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:21:03 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"skirt"}
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')[0m
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:21:06 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"shoes"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:21:07 +0200
+Processing by ProductsController#update as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"}
+ [1m[36mProduct Load (0.3ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1
+ [1m[36mSQL (0.5ms)[0m [1mDELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]
+ [1m[36m (1.6ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:53294/products
+Completed 302 Found in 49ms (ActiveRecord: 3.1ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:07 +0200
+Processing by ProductsController#index as HTML
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products"
+ [1m[36m (0.1ms)[0m [1mSELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.3ms)
+ [1m[35mProduct Load (0.3ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mCategory Load (0.3ms)[0m [1mSELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1[0m
+ [1m[35m (1.4ms)[0m DELETE FROM "categories";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.2ms)[0m DELETE FROM "products";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.1ms)[0m DELETE FROM "items";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]
+ [1m[35m (2.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]
+ [1m[36m (1.2ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:08 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms)
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.4ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.8ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.3ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]
+ [1m[36m (1.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:21:08 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (76.6ms)
+Completed 200 OK in 81ms (Views: 80.7ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:21:10 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"shoes"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]
+ [1m[36m (24.6ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:53294/items
+Completed 302 Found in 28ms (ActiveRecord: 25.2ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.3ms)
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.3ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (17.1ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (14.2ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (9.3ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'items';
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]
+ [1m[36m (1.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:21:11 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (4.9ms)
+Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200
+Processing by ItemsController#create as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]
+ [1m[35m (1.3ms)[0m commit transaction
+Redirected to http://www.example.com/items
+Completed 302 Found in 5ms (ActiveRecord: 1.9ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ [1m[35m (1.5ms)[0m DELETE FROM "categories";
+ [1m[36m (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "products";
+ [1m[36m (0.4ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (2.1ms)[0m DELETE FROM "items";
+ [1m[36m (20.7ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:21:12 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ Rendered items/_form.html.erb (7.5ms)
+Completed 200 OK in 12ms (Views: 10.3ms | ActiveRecord: 0.5ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:21:12 +0200
+Processing by ItemsController#update as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.3ms)[0m [1mUPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:21:12.197596' WHERE "items"."id" = 1[0m
+ [1m[35m (0.9ms)[0m commit transaction
+Redirected to http://www.example.com/items
+Completed 302 Found in 5ms (ActiveRecord: 1.4ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:12 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.2ms)
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1[0m
+ [1m[35m (23.5ms)[0m DELETE FROM "categories";
+ [1m[36m (7.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (25.4ms)[0m DELETE FROM "products";
+ [1m[36m (0.6ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (1.3ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (8.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (20.2ms)[0m DELETE FROM "items";
+ [1m[36m (1.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'items';[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[35m (1.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+
+
+Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:21:12 +0200
+Processing by ItemsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", "1"]]
+ [1m[35mCategory Load (0.3ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ Rendered items/_form.html.erb (8.2ms)
+Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.5ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:21:13 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"skirt"}
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')[0m
+Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:21:14 +0200
+Processing by ItemsController#update as HTML
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.3ms)[0m UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:21:14.802393' WHERE "items"."id" = 1
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:53294/items
+Completed 302 Found in 4ms (ActiveRecord: 1.3ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:14 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)
+ [1m[36mItem Load (0.2ms)[0m [1mSELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
+ [1m[36m (1.5ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (4.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (2.2ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.4ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.8ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.5ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.3ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.6ms)[0m DELETE FROM sqlite_sequence where name = 'items';