spec/dummy/log/test.log in token_field-0.0.3 vs spec/dummy/log/test.log in token_field-1.0.0
- old
+ new
@@ -8137,5 +8137,1385 @@
[1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'products';
[1m[36m (1.1ms)[0m [1mDELETE FROM "product_has_categories";[0m
[1m[35m (1.1ms)[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';
+Connecting to database specified by database.yml
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (4.9ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:29 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:29 UTC +00:00]]
+ [1m[36m (1.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 23:39:29 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:29 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 23:39:29 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:29 UTC +00:00]]
+ [1m[36m (1.1ms)[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 01:39:29 +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 (9.0ms)
+ Rendered categories/edit.html.erb within layouts/application (13.6ms)
+Completed 200 OK in 24ms (Views: 22.8ms | ActiveRecord: 0.4ms)
+
+
+Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 01:39:30 +0200
+Processing by CategoriesController#update as HTML
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"}
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", "3"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.3ms)[0m [1mUPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:39:30.085163' WHERE "categories"."id" = 3[0m
+ [1m[35m (1.0ms)[0m commit transaction
+Redirected to http://www.example.com/categories
+Completed 302 Found in 5ms (ActiveRecord: 1.4ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:39:30 +0200
+Processing by CategoriesController#index as HTML
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" [0m
+ Rendered categories/index.html.erb within layouts/application (1.9ms)
+Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.2ms)
+ [1m[35mCategory Load (0.1ms)[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" = 2 LIMIT 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.0ms)[0m DELETE FROM "products";
+ [1m[36m (0.3ms)[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.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 23:39:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:30 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+
+
+Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 01:39:30 +0200
+Processing by CategoriesController#new as HTML
+ Rendered categories/_form.html.erb (2.5ms)
+Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/categories" for 127.0.0.1 at 2012-10-14 01:39:30 +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.4ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:30 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:30 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/categories
+Completed 302 Found in 4ms (ActiveRecord: 1.6ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:39:30 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [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 (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.0ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.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 23:39:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:30 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 23:39:30 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:30 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 23:39:30 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:30 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.1ms)[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 01:39:32 +0200
+Processing by CategoriesController#edit as HTML
+ Parameters: {"id"=>"3"}
+ [1m[36mCategory Load (0.3ms)[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 (7.2ms)
+Completed 200 OK in 13ms (Views: 9.8ms | ActiveRecord: 1.1ms)
+
+
+Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 01:39:32 +0200
+Served asset /application.css - 200 OK (5ms)
+
+
+Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 01:39:32 +0200
+Served asset /application.js - 200 OK (6ms)
+
+
+Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-14 01:39:33 +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 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 01:39:34 +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.3ms)[0m UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:39:34.424859' WHERE "categories"."id" = 3
+ [1m[36m (0.7ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:56775/categories
+Completed 302 Found in 5ms (ActiveRecord: 1.1ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:39:34 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.5ms | 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 (1.3ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (2.6ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.8ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.5ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.5ms)[0m [1mDELETE FROM "items";[0m
+ [1m[35m (1.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 23:39:34 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:34 UTC +00:00]]
+ [1m[36m (65.0ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 01:39:34 +0200
+Processing by CategoriesController#new as HTML
+ Rendered categories/_form.html.erb (2.6ms)
+Completed 200 OK in 4ms (Views: 3.9ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-14 01:39:35 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"wood"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%')
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/categories" for 127.0.0.1 at 2012-10-14 01:39:36 +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.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:56775/categories
+Completed 302 Found in 4ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:39:36 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.5ms)[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.5ms)[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.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:39:36 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.2ms)
+ [1m[36m (1.0ms)[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.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.0ms)[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.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 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 23:39:36 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[35m (0.8ms)[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 23:39:36 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[36m (0.7ms)[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 23:39:36 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 23:39:36 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 01:39:36 +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.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ Rendered items/_form.html.erb (65.6ms)
+Completed 200 OK in 72ms (Views: 70.1ms | ActiveRecord: 0.4ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 01:39:36 +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.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.2ms)[0m UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 23:39:36.338070' WHERE "items"."id" = 1
+ [1m[36m (1.8ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/items
+Completed 302 Found in 5ms (ActiveRecord: 2.2ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:39:36 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.2ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms)
+ [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.1ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.4ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.5ms)[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 23:39:36 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 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 23:39:36 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 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 23:39:36 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 01:39:36 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (3.7ms)
+Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 01:39:36 +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.6ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[35m (1.8ms)[0m commit transaction
+Redirected to http://www.example.com/items
+Completed 302 Found in 5ms (ActiveRecord: 2.5ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:39:36 +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[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 (0.9ms)[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 (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.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 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 "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 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 23:39:36 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[35m (0.8ms)[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 23:39:36 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.1ms)[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 01:39:36 +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.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ Rendered items/_form.html.erb (4.9ms)
+Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.5ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 01:39:37 +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.1ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 01:39:37 +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.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.3ms)[0m UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 23:39:37.953972' WHERE "items"."id" = 1
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:56775/items
+Completed 302 Found in 4ms (ActiveRecord: 1.4ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:39:37 +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.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.0ms)[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.5ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.6ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[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.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:38 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 23:39:38 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:38 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 23:39:38 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:38 UTC +00:00]]
+ [1m[36m (1.3ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 01:39:38 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (5.9ms)
+Completed 200 OK in 8ms (Views: 8.0ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 01:39:38 +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 01:39:39 +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 23:39:39 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:56775/items
+Completed 302 Found in 3ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:39:39 +0200
+Processing by ItemsController#index as HTML
+ [1m[35mItem Load (0.1ms)[0m SELECT "items".* FROM "items"
+Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)
+ [1m[36mItem Load (0.2ms)[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.4ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.7ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.2ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.7ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.1ms)[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 23:39:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36m (1.0ms)[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 23:39:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35m (1.1ms)[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 23:39:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 1], ["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:39:39 +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.2ms | ActiveRecord: 0.1ms)
+ [1m[35m (1.0ms)[0m DELETE FROM "categories";
+ [1m[36m (0.8ms)[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.4ms)[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.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 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 "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36m (1.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 23:39:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35m (1.0ms)[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.5ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 23:39:39 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 23:39:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36mSQL (0.1ms)[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 23:39:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+
+
+Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 01:39:39 +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.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.1ms)[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.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
+ Rendered products/_form.html.erb (15.8ms)
+Completed 200 OK in 20ms (Views: 18.4ms | ActiveRecord: 0.5ms)
+
+
+Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 01:39:39 +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.0ms)[0m begin transaction
+ [1m[36mCategory Load (0.2ms)[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.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 23:39:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36m (1.6ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/products
+Completed 302 Found in 11ms (ActiveRecord: 2.5ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:39:39 +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 6ms (Views: 4.5ms | ActiveRecord: 0.3ms)
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mCategory Load (0.1ms)[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.3ms)[0m DELETE FROM "categories";
+ [1m[36m (1.2ms)[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.1ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.9ms)[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.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 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 23:39:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 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 23:39:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+
+
+Started GET "/products/new" for 127.0.0.1 at 2012-10-14 01:39:39 +0200
+Processing by ProductsController#new as HTML
+ [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" 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 (4.3ms)
+Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/products" for 127.0.0.1 at 2012-10-14 01:39:39 +0200
+Processing by ProductsController#create as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"}
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[36mSQL (0.1ms)[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 23:39:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]
+ [1m[35m (1.2ms)[0m commit transaction
+Redirected to http://www.example.com/products
+Completed 302 Found in 7ms (ActiveRecord: 2.1ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:39:39 +0200
+Processing by ProductsController#index as HTML
+ [1m[36mProduct Load (0.2ms)[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.7ms | ActiveRecord: 0.3ms)
+ [1m[36mProduct Load (0.1ms)[0m [1mSELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 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[36m (0.9ms)[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 (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (1.1ms)[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.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:40 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 23:39:40 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00]]
+ [1m[35m (1.1ms)[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 23:39:40 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 23:39:40 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", 1], ["created_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00]]
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00]]
+ [1m[36m (1.2ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 01:39:40 +0200
+Processing by ProductsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
+ [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
+ [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" = 1
+ [1m[36mCategory Load (0.1ms)[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
+ Rendered products/_form.html.erb (6.0ms)
+Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 0.8ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 01:39:40 +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 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 01:39:41 +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 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
+
+
+Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 01:39:42 +0200
+Processing by ProductsController#update as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"}
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)
+ [1m[36mCategory Load (0.1ms)[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[35mSQL (0.2ms)[0m DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 2], ["created_at", Sat, 13 Oct 2012 23:39:42 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:42 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+Redirected to http://127.0.0.1:56775/products
+Completed 302 Found in 9ms (ActiveRecord: 2.4ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:39:42 +0200
+Processing by ProductsController#index as HTML
+ [1m[36mProduct Load (0.2ms)[0m [1mSELECT "products".* FROM "products" [0m
+ [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
+Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.4ms)
+ [1m[36mProduct Load (0.1ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1[0m [["id", 1]]
+ [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 (0.9ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.5ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (1.3ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (1.4ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (1.1ms)[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 23:39:42 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:42 UTC +00:00]]
+ [1m[36m (1.4ms)[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 23:39:42 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:42 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 23:39:42 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:42 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/products/new" for 127.0.0.1 at 2012-10-14 01:39:42 +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.1ms)[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 (4.5ms)
+Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.3ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 01:39:43 +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.1ms | ActiveRecord: 0.2ms)
+
+
+Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-14 01:39:44 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"pents"}
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%')[0m
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
+
+
+Started POST "/products" for 127.0.0.1 at 2012-10-14 01:39:45 +0200
+Processing by ProductsController#create as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"}
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]
+ [1m[36mSQL (0.3ms)[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 23:39:45 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:56775/products
+Completed 302 Found in 10ms (ActiveRecord: 2.7ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:39:45 +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 3ms (Views: 2.6ms | ActiveRecord: 0.2ms)
+ [1m[35mProduct Load (0.2ms)[0m SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1
+ [1m[36mCategory Load (0.1ms)[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.5ms)[0m [1mDELETE FROM sqlite_sequence where name = 'categories';[0m
+ [1m[35m (1.0ms)[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.0ms)[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.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:45 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 23:39:45 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:45 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 23:39:45 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 23:39:45 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 23:39:45 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 2], ["created_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]
+ [1m[35m (1.8ms)[0m commit transaction
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:39:45 +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.8ms | ActiveRecord: 0.3ms)
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[0m [1mDELETE FROM "products";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.0ms)[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 (4.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:06 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:06 UTC +00:00]]
+ [1m[36m (1.5ms)[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 23:47:06 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:06 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 23:47:06 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:06 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 "/categories/3/edit" for 127.0.0.1 at 2012-10-14 01:47:09 +0200
+Processing by CategoriesController#edit as HTML
+ Parameters: {"id"=>"3"}
+ [1m[36mCategory Load (0.1ms)[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 (10.6ms)
+ Rendered categories/edit.html.erb within layouts/application (46.6ms)
+Completed 200 OK in 62ms (Views: 59.2ms | ActiveRecord: 0.9ms)
+
+
+Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 01:47:10 +0200
+Served asset /application.css - 200 OK (6ms)
+
+
+Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 01:47:10 +0200
+Served asset /application.js - 200 OK (6ms)
+
+
+Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-14 01:47:10 +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 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 01:47:11 +0200
+Processing by CategoriesController#update as HTML
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "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 23:47:11.535973' WHERE "categories"."id" = 3
+ [1m[36m (0.5ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:57074/categories
+Completed 302 Found in 7ms (ActiveRecord: 1.1ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:47:11 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories"
+ Rendered categories/index.html.erb within layouts/application (2.3ms)
+Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.2ms)
+ [1m[36mCategory Load (0.4ms)[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 (55.5ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (2.3ms)[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 (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.9ms)[0m DELETE FROM sqlite_sequence where name = 'product_has_categories';
+ [1m[36m (1.8ms)[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 23:47:11 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:11 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:47:11 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)
+ [1m[36m (1.3ms)[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.4ms)[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.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:11 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:11 UTC +00:00]]
+ [1m[36m (1.5ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 01:47:11 +0200
+Processing by CategoriesController#new as HTML
+ Rendered categories/_form.html.erb (2.5ms)
+Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/categories" for 127.0.0.1 at 2012-10-14 01:47:11 +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 23:47:11 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:11 UTC +00:00]]
+ [1m[35m (1.4ms)[0m commit transaction
+Redirected to http://www.example.com/categories
+Completed 302 Found in 4ms (ActiveRecord: 1.9ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:47:11 +0200
+Processing by CategoriesController#index as HTML
+ [1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" [0m
+Completed 200 OK in 4ms (Views: 3.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 (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 (1.3ms)[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 23:47:12 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:12 UTC +00:00]]
+ [1m[35m (1.8ms)[0m commit transaction
+
+
+Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 01:47:12 +0200
+Processing by CategoriesController#new as HTML
+ Rendered categories/_form.html.erb (4.0ms)
+Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-14 01:47:12 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"wood"}
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%')[0m
+Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/categories" for 127.0.0.1 at 2012-10-14 01:47:13 +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 23:47:13 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+Redirected to http://127.0.0.1:57074/categories
+Completed 302 Found in 4ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:47:13 +0200
+Processing by CategoriesController#index as HTML
+ [1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" [0m
+Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms)
+ [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.0ms)[0m DELETE FROM "categories";
+ [1m[36m (1.3ms)[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 (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (0.8ms)[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.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:13 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 23:47:13 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[36m (1.5ms)[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 23:47:13 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[35m (0.9ms)[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 01:47:13 +0200
+Processing by CategoriesController#edit as HTML
+ Parameters: {"id"=>"3"}
+ [1m[35mCategory Load (0.1ms)[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.1ms)
+Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.3ms)
+
+
+Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 01:47:13 +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.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.2ms)[0m UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:47:13.590811' WHERE "categories"."id" = 3
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/categories
+Completed 302 Found in 3ms (ActiveRecord: 1.4ms)
+
+
+Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:47:13 +0200
+Processing by CategoriesController#index as HTML
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories"
+Completed 200 OK in 3ms (Views: 2.1ms | 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.0ms)[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 (0.8ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (0.6ms)[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 23:47:13 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[36m (1.7ms)[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 23:47:13 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[35m (1.3ms)[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 23:47:13 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[36m (1.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 23:47:13 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]
+ [1m[35m (1.0ms)[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 01:47:13 +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.2ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1[0m
+ Rendered items/_form.html.erb (63.4ms)
+Completed 200 OK in 68ms (Views: 66.1ms | ActiveRecord: 0.5ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 01:47:14 +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 01:47:15 +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 23:47:15.138499' WHERE "items"."id" = 1[0m
+ [1m[35m (0.9ms)[0m commit transaction
+Redirected to http://127.0.0.1:57074/items
+Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:47:15 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 4ms (Views: 3.1ms | 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.2ms)[0m DELETE FROM "categories";
+ [1m[36m (1.2ms)[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.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.1ms)[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 23:47:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[35m (1.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 23:47:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[36m (1.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 23:47:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.0ms)[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 23:47:15 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[36m (1.9ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:47:15 +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[36m (1.2ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.2ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.9ms)[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 (0.9ms)[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 23:47:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[36m (1.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (31.2ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 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 "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 01:47:15 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (4.3ms)
+Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 01:47:15 +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 23:47:15 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[35m (1.5ms)[0m commit transaction
+Redirected to http://www.example.com/items
+Completed 302 Found in 4ms (ActiveRecord: 2.0ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:47:15 +0200
+Processing by ItemsController#index as HTML
+ [1m[36mItem Load (0.1ms)[0m [1mSELECT "items".* FROM "items" [0m
+Completed 200 OK in 2ms (Views: 1.7ms | 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 (0.9ms)[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 (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 (0.9ms)[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 23:47:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[35m (1.7ms)[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 23:47:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[36m (1.0ms)[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 23:47:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]
+ [1m[35m (0.8ms)[0m commit transaction
+
+
+Started GET "/items/new" for 127.0.0.1 at 2012-10-14 01:47:15 +0200
+Processing by ItemsController#new as HTML
+ Rendered items/_form.html.erb (3.6ms)
+Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 01:47:16 +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 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/items" for 127.0.0.1 at 2012-10-14 01:47:16 +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 23:47:16 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:47:16 UTC +00:00]]
+ [1m[35m (1.0ms)[0m commit transaction
+Redirected to http://127.0.0.1:57074/items
+Completed 302 Found in 4ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:47:16 +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.5ms | 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 (0.9ms)[0m DELETE FROM "categories";
+ [1m[36m (1.3ms)[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 (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.6ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:16 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:16 UTC +00:00]]
+ [1m[35m (1.4ms)[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 23:47:16 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:16 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 23:47:16 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:16 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 "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 23:47:16 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 23:47:16 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.1ms)[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 01:47:16 +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"]]
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
+ Rendered items/_form.html.erb (4.8ms)
+Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.2ms)
+
+
+Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 01:47:17 +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 23:47:17.010915' WHERE "items"."id" = 1[0m
+ [1m[35m (1.1ms)[0m commit transaction
+Redirected to http://www.example.com/items
+Completed 302 Found in 4ms (ActiveRecord: 1.5ms)
+
+
+Started GET "/items" for 127.0.0.1 at 2012-10-14 01:47:17 +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.0ms | ActiveRecord: 0.2ms)
+ [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" = 2 LIMIT 1[0m
+ [1m[35m (1.2ms)[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.0ms)[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.4ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:17 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:17 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 23:47:17 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:17 UTC +00:00]]
+ [1m[36m (0.7ms)[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 23:47:17 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:17 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.5ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:17 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 23:47:17 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 23:47:17 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:17 UTC +00:00]]
+ [1m[36mSQL (0.1ms)[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 23:47:17 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:17 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+
+
+Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 01:47:17 +0200
+Processing by ProductsController#edit as HTML
+ Parameters: {"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 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.1ms)[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.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
+ Rendered products/_form.html.erb (18.4ms)
+Completed 200 OK in 23ms (Views: 20.8ms | ActiveRecord: 1.0ms)
+
+
+Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 01:47:17 +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 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 01:47:19 +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 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
+
+
+Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 01:47:19 +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.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.2ms)[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 23:47:19 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:19 UTC +00:00]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+Redirected to http://127.0.0.1:57074/products
+Completed 302 Found in 14ms (ActiveRecord: 2.4ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:47:19 +0200
+Processing by ProductsController#index as HTML
+ [1m[35mProduct Load (0.1ms)[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 5ms (Views: 4.1ms | ActiveRecord: 0.3ms)
+ [1m[35mProduct Load (0.3ms)[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 (0.9ms)[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.9ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (1.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'product_has_categories';[0m
+ [1m[35m (1.1ms)[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.5ms)[0m [1mINSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[35m (1.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 23:47:20 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[36m (1.0ms)[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 23:47:20 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 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, 2)[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 2], ["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[35m (1.2ms)[0m commit transaction
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:47:20 +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.3ms)
+ [1m[36m (1.1ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[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 (1.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.6ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 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 23:47:20 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 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 23:47:20 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/products/new" for 127.0.0.1 at 2012-10-14 01:47:20 +0200
+Processing by ProductsController#new as HTML
+ [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" IS NULL
+ [1m[36m (0.1ms)[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 (4.6ms)
+Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.2ms)
+
+
+Started POST "/products" for 127.0.0.1 at 2012-10-14 01:47:20 +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.3ms)[0m INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:47:20 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 23:47:20 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:20 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 23:47:20 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+Redirected to http://www.example.com/products
+Completed 302 Found in 7ms (ActiveRecord: 1.9ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:47:20 +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: 3.5ms | ActiveRecord: 0.3ms)
+ [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.9ms)[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 (1.0ms)[0m [1mDELETE FROM sqlite_sequence where name = 'products';[0m
+ [1m[35m (0.9ms)[0m DELETE FROM "product_has_categories";
+ [1m[36m (0.9ms)[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 23:47:20 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 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 "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[36m (1.0ms)[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 23:47:20 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+
+
+Started GET "/products/new" for 127.0.0.1 at 2012-10-14 01:47:20 +0200
+Processing by ProductsController#new as HTML
+ [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" 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 (6.0ms)
+Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.3ms)
+
+
+Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 01:47:20 +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 01:47:22 +0200
+Processing by CategoriesController#token as JSON
+ Parameters: {"q"=>"pents"}
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%')
+Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
+
+
+Started POST "/products" for 127.0.0.1 at 2012-10-14 01:47:23 +0200
+Processing by ProductsController#create as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"}
+ [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.6ms)[0m [1mINSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 23:47:23 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 23:47:23 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:23 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 23:47:23 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[35m (2.5ms)[0m commit transaction
+Redirected to http://127.0.0.1:57074/products
+Completed 302 Found in 11ms (ActiveRecord: 4.0ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:47:23 +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 3ms (Views: 2.5ms | ActiveRecord: 0.2ms)
+ [1m[36mProduct Load (0.2ms)[0m [1mSELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 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[36m (1.5ms)[0m [1mDELETE FROM "categories";[0m
+ [1m[35m (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'categories';
+ [1m[36m (1.0ms)[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.1ms)[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.5ms)[0m INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[36m (1.5ms)[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 23:47:23 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:23 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 23:47:23 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35mCategory Load (0.2ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[36mSQL (0.1ms)[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 23:47:23 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[36m (1.2ms)[0m [1mcommit transaction[0m
+
+
+Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 01:47:23 +0200
+Processing by ProductsController#edit as HTML
+ Parameters: {"id"=>"1"}
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
+ [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
+ [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" = 1
+ [1m[36mCategory Load (0.1ms)[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
+ Rendered products/_form.html.erb (6.4ms)
+Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 0.5ms)
+
+
+Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 01:47:23 +0200
+Processing by ProductsController#update as HTML
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"}
+ [1m[35mProduct Load (0.1ms)[0m SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)
+ [1m[36mCategory Load (0.1ms)[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[35mSQL (0.2ms)[0m DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["category_id", 2], ["created_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]
+ [1m[35m (1.6ms)[0m commit transaction
+Redirected to http://www.example.com/products
+Completed 302 Found in 7ms (ActiveRecord: 2.4ms)
+
+
+Started GET "/products" for 127.0.0.1 at 2012-10-14 01:47:23 +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 3ms (Views: 2.7ms | ActiveRecord: 0.2ms)
+ [1m[36mProduct Load (0.1ms)[0m [1mSELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1[0m [["id", 1]]
+ [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[36m (1.1ms)[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 (1.0ms)[0m DELETE FROM sqlite_sequence where name = 'products';
+ [1m[36m (0.9ms)[0m [1mDELETE FROM "product_has_categories";[0m
+ [1m[35m (1.0ms)[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';