Connecting to database specified by database.yml  (0.2ms) select sqlite_version(*)  (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.0ms) PRAGMA index_list("schema_migrations")  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateCategories (20121012100526)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "parent_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121012100526')  (1.1ms) commit transaction  (0.2ms) select sqlite_version(*)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (0.0ms) PRAGMA index_list("categories") Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:20:51 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:20:51 UTC +00:00]]  (1.5ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:20:52 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.3ms) Completed 200 OK in 42ms (Views: 40.7ms | ActiveRecord: 0.1ms)  (1.6ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (7.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:22:41 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:22:41 UTC +00:00]]  (2.6ms) commit transaction  (1.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:22:41 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:22:41 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:22:42 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 52ms (Views: 50.3ms | ActiveRecord: 0.2ms)  (2.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:22:52 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:22:52 UTC +00:00]]  (2.7ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:22:53 +0200 Processing by CategoriesController#new as HTML Rendered categories/new.html.erb within layouts/application (8.7ms) Completed 200 OK in 53ms (Views: 52.3ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 12:22:53 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"3"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:22:53 UTC +00:00], ["name", "hello"], ["parent_id", 3], ["updated_at", Fri, 12 Oct 2012 10:22:53 UTC +00:00]]  (1.6ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 5ms (ActiveRecord: 2.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:22:53 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.2ms)  (1.8ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:22:53 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:22:53 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:22:53 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.2ms)  (1.6ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:23:41 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:23:41 UTC +00:00]]  (1.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:23:41 +0200 Processing by CategoriesController#new as HTML Rendered categories/new.html.erb within layouts/application (10.8ms) Completed 200 OK in 60ms (Views: 58.8ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 12:23:42 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"3"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:23:42 UTC +00:00], ["name", "hello"], ["parent_id", 3], ["updated_at", Fri, 12 Oct 2012 10:23:42 UTC +00:00]]  (1.9ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 6ms (ActiveRecord: 2.6ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:23:42 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.2ms)  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:23:50 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:23:50 UTC +00:00]]  (2.5ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:23:51 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.5ms) Completed 200 OK in 41ms (Views: 39.2ms | ActiveRecord: 0.1ms)  (1.3ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:23:51 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:23:51 UTC +00:00]]  (1.1ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:23:55 +0200 Processing by CategoriesController#new as HTML Completed 200 OK in 14ms (Views: 13.5ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-12 12:23:56 +0200 Compiled token-input.css (0ms) (pid 70964) Compiled categories.css (0ms) (pid 70964) Compiled application.css (12ms) (pid 70964) Served asset /application.css - 200 OK (52ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-12 12:23:56 +0200 Compiled jquery.js (6ms) (pid 70964) Compiled jquery_ujs.js (0ms) (pid 70964) Compiled jquery.tokeninput.js (1ms) (pid 70964) Compiled categories.js (0ms) (pid 70964) Compiled application.js (78ms) (pid 70964) Served asset /application.js - 200 OK (109ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 12:23:57 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"3"}, "commit"=>"Create Category"}  (0.4ms) begin transaction SQL (2.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:23:57 UTC +00:00], ["name", "hello"], ["parent_id", 3], ["updated_at", Fri, 12 Oct 2012 10:23:57 UTC +00:00]]  (0.9ms) commit transaction Redirected to http://127.0.0.1:58334/categories Completed 302 Found in 8ms (ActiveRecord: 3.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:23:57 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.4ms)  (79.6ms) DELETE FROM "categories";  (27.4ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:45:32 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:45:32 UTC +00:00]]  (2.4ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:45:32 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.8ms) Completed 200 OK in 55ms (Views: 53.3ms | ActiveRecord: 0.2ms)  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:45:32 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:45:32 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:45:32 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (13.6ms) Completed 200 OK in 50ms (Views: 49.9ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 12:45:33 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (1.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:45:33 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 10:45:33 UTC +00:00]]  (1.4ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 8ms (ActiveRecord: 2.8ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:45:33 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.2ms)  (11.1ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:45:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:45:33 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:45:37 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (3.8ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-12 12:45:37 +0200 Compiled token-input-facebook.css (0ms) (pid 84397) Compiled application.css (7ms) (pid 84397) Served asset /application.css - 200 OK (15ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-12 12:45:37 +0200 Compiled jquery.js (3ms) (pid 84397) Compiled jquery_ujs.js (0ms) (pid 84397) Compiled jquery.tokeninput.js (0ms) (pid 84397) Compiled application.js (24ms) (pid 84397) Served asset /application.js - 200 OK (82ms)  (1.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:46:42 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:46:42 UTC +00:00]]  (1.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:46:47 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (48.0ms) Rendered categories/new.html.erb within layouts/application (59.4ms) Completed 200 OK in 79ms (Views: 77.8ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-12 12:46:47 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-12 12:46:47 +0200 Served asset /application.js - 200 OK (6ms) Started GET "/categories/token.json?q=wood" for 127.0.0.1 at 2012-10-12 12:46:48 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 12:46:49 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:46:49 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 10:46:49 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://127.0.0.1:58658/categories Completed 302 Found in 6ms (ActiveRecord: 1.9ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:46:49 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms)  (1.3ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:46:49 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:46:49 UTC +00:00]]  (291.2ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 12:46:50 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (2.6ms) Completed 200 OK in 5ms (Views: 4.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 12:46:50 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:46:50 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 10:46:50 UTC +00:00]]  (107.3ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 110ms (ActiveRecord: 107.7ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:46:50 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 10:46:50 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 10:46:50 UTC +00:00]]  (2.0ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 12:46:50 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.2ms)  (1.0ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:13:17 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:13:17 UTC +00:00]]  (1.7ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 13:13:23 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (15.6ms) Rendered categories/new.html.erb within layouts/application (50.9ms) Completed 200 OK in 64ms (Views: 63.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-12 13:13:23 +0200 Compiled token-input-facebook.css (0ms) (pid 1338) Compiled application.css (7ms) (pid 1338) Served asset /application.css - 200 OK (15ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-12 13:13:23 +0200 Compiled jquery.js (3ms) (pid 1338) Compiled jquery_ujs.js (0ms) (pid 1338) Compiled jquery.tokeninput.js (0ms) (pid 1338) Compiled application.js (42ms) (pid 1338) Served asset /application.js - 200 OK (54ms) Started GET "/categories/token.json?q=wood" for 127.0.0.1 at 2012-10-12 13:13:24 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.7ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 13:13:24 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:13:24 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 11:13:24 UTC +00:00]]  (150.5ms) commit transaction Redirected to http://127.0.0.1:58926/categories Completed 302 Found in 155ms (ActiveRecord: 151.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:13:25 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.1ms)  (3.3ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:13:25 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:13:25 UTC +00:00]]  (0.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 13:13:25 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (2.1ms) Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 13:13:25 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:13:25 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 11:13:25 UTC +00:00]]  (1.6ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 2.0ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:13:25 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (1.4ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:13:25 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:13:25 UTC +00:00]]  (1.6ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:13:25 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 2.5ms | ActiveRecord: 0.2ms)  (1.4ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00]]  (1.0ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:14:07 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.4ms) Completed 200 OK in 42ms (Views: 41.0ms | ActiveRecord: 0.1ms)  (1.2ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00]]  (1.1ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 13:14:07 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (35.8ms) Completed 200 OK in 42ms (Views: 41.5ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 13:14:07 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 1.7ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:14:07 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)  (1.2ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:14:07 UTC +00:00]]  (1.0ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 13:14:12 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (6.2ms) Completed 200 OK in 16ms (Views: 14.6ms | ActiveRecord: 0.0ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-12 13:14:12 +0200 Served asset /application.js - 200 OK (21ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-12 13:14:12 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/categories/token.json?q=wood" for 127.0.0.1 at 2012-10-12 13:14:13 +0200  (2.5ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:17:16 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:17:16 UTC +00:00]]  (2.6ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:17:17 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (4.3ms) Completed 200 OK in 46ms (Views: 44.4ms | ActiveRecord: 0.1ms)  (2.4ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:17:17 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:17:17 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 13:17:21 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (21.3ms) Completed 200 OK in 30ms (Views: 29.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-12 13:17:21 +0200 Compiled token-input-facebook.css (0ms) (pid 3818) Compiled application.css (8ms) (pid 3818) Served asset /application.css - 200 OK (18ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-12 13:17:21 +0200 Compiled jquery.js (4ms) (pid 3818) Compiled jquery_ujs.js (0ms) (pid 3818) Compiled jquery.tokeninput.js (0ms) (pid 3818) Compiled application.js (51ms) (pid 3818) Served asset /application.js - 200 OK (62ms) Started GET "/categories/token.json?q=wood" for 127.0.0.1 at 2012-10-12 13:17:22 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 13:17:23 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (359.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:17:23 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 11:17:23 UTC +00:00]]  (106.0ms) commit transaction Redirected to http://127.0.0.1:59135/categories Completed 302 Found in 470ms (ActiveRecord: 465.8ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:17:23 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (1.6ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:17:23 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 11:17:23 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-12 13:17:23 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.6ms) Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-12 13:17:23 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 11:17:23 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 11:17:23 UTC +00:00]]  (1.3ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 6ms (ActiveRecord: 2.1ms) Started GET "/categories" for 127.0.0.1 at 2012-10-12 13:17:24 +0200 Processing by CategoriesController#index as HTML Category Load (0.3ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 6ms (Views: 2.6ms | ActiveRecord: 0.3ms)  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 01:52:11 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.4ms) Completed 200 OK in 79ms (Views: 78.0ms | ActiveRecord: 0.1ms)  (1.6ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00]]  (1.4ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 01:52:11 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (48.6ms) Completed 200 OK in 118ms (Views: 117.9ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 01:52:11 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 1.8ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 01:52:11 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.2ms)  (1.2ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Fri, 12 Oct 2012 23:52:11 UTC +00:00]]  (1.2ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 01:52:21 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (5.8ms) Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 01:52:21 +0200 Compiled token-input-facebook.css (0ms) (pid 49019) Compiled application.css (5ms) (pid 49019) Served asset /application.css - 200 OK (219ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 01:52:21 +0200 Compiled jquery.js (4ms) (pid 49019) Compiled jquery_ujs.js (0ms) (pid 49019) Compiled jquery.tokeninput.js (0ms) (pid 49019) Compiled application.js (138ms) (pid 49019) Served asset /application.js - 200 OK (247ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 01:52:22 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 01:52:23 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 12 Oct 2012 23:52:23 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Fri, 12 Oct 2012 23:52:23 UTC +00:00]]  (542.4ms) commit transaction Redirected to http://127.0.0.1:58139/categories Completed 302 Found in 547ms (ActiveRecord: 543.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 01:52:25 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.2ms)  (1.1ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories'; Connecting to database specified by database.yml  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateCategories (20121012100526) Migrating to CreateProducts (20121012235444)  (0.0ms) select sqlite_version(*)  (0.0ms) begin transaction  (0.6ms) CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121012235444')  (2.6ms) commit transaction Migrating to CreateProductHasCategories (20121012235509)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "product_has_categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "product_id" integer, "category_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121012235509')  (1.8ms) commit transaction  (0.3ms) select sqlite_version(*)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  (0.1ms) PRAGMA index_list("categories")  (0.0ms) PRAGMA index_list("product_has_categories")  (0.0ms) PRAGMA index_list("products") Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (6.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:41 UTC +00:00], ["name", "shoes"], ["updated_at", Sat, 13 Oct 2012 00:23:41 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:41 UTC +00:00], ["name", "skirt"], ["updated_at", Sat, 13 Oct 2012 00:23:41 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:41 UTC +00:00], ["name", "pents"], ["updated_at", Sat, 13 Oct 2012 00:23:41 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 02:23:48 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) 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 (211.2ms) Rendered products/new.html.erb within layouts/application (221.3ms) Completed 200 OK in 243ms (Views: 241.1ms | ActiveRecord: 1.3ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 02:23:48 +0200 Served asset /application.css - 200 OK (23ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 02:23:48 +0200 Served asset /application.js - 200 OK (107ms)  (390.3ms) DELETE FROM "categories";  (18.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (14.5ms) DELETE FROM "products";  (15.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:51 UTC +00:00], ["name", "shoes"], ["updated_at", Sat, 13 Oct 2012 00:23:51 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:51 UTC +00:00], ["name", "skirt"], ["updated_at", Sat, 13 Oct 2012 00:23:51 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:51 UTC +00:00], ["name", "pents"], ["updated_at", Sat, 13 Oct 2012 00:23:51 UTC +00:00]]  (1.3ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 02:23:51 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (5.1ms) Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.5ms)  (1.8ms) DELETE FROM "categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.8ms) DELETE FROM "products";  (1.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:52 UTC +00:00], ["name", "shoes"], ["updated_at", Sat, 13 Oct 2012 00:23:52 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:52 UTC +00:00], ["name", "skirt"], ["updated_at", Sat, 13 Oct 2012 00:23:52 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 00:23:52 UTC +00:00], ["name", "pents"], ["updated_at", Sat, 13 Oct 2012 00:23:52 UTC +00:00]]  (1.2ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 02:23:52 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms)  (1.3ms) DELETE FROM "categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (1.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.8ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (13.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:14:41 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:14:41 UTC +00:00]]  (4.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:14:41 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:14:41 UTC +00:00]]  (5.6ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:14:41 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:14:41 UTC +00:00]]  (3.5ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:14:59 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.3ms) 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 (206.9ms) Rendered products/new.html.erb within layouts/application (658.7ms) Completed 200 OK in 689ms (Views: 678.7ms | ActiveRecord: 1.4ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:15:00 +0200 Compiled token-input-facebook.css (0ms) (pid 2008) Compiled application.css (16ms) (pid 2008) Served asset /application.css - 200 OK (67ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:15:00 +0200 Compiled jquery.js (5ms) (pid 2008) Compiled jquery_ujs.js (0ms) (pid 2008) Compiled jquery.tokeninput.js (0ms) (pid 2008) Compiled application.js (39ms) (pid 2008) Served asset /application.js - 200 OK (621ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 12:15:04 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 12:15:05 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:15:07 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (96.0ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:07 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:15:07 UTC +00:00]] SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:15:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:15:07 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:15:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:15:07 UTC +00:00]]  (1.4ms) commit transaction Redirected to http://127.0.0.1:59772/products Completed 302 Found in 140ms (ActiveRecord: 98.8ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 12:15:07 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (3.7ms) Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (1.4ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (1.6ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:15:10 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL Rendered products/_form.html.erb (7.4ms) Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms)  (2.0ms) DELETE FROM "categories";  (7.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (13.9ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (20.3ms) DELETE FROM "product_has_categories";  (102.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]] SQL (0.8ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:15:10 UTC +00:00]]  (86.9ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 12:15:11 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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 7ms (Views: 4.9ms | ActiveRecord: 0.6ms)  (17.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (13.2ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (6.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:46 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:46 UTC +00:00]]  (3.2ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:46 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:46 UTC +00:00]]  (3.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:15:46 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:15:46 UTC +00:00]]  (8.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:15:46 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (135.0ms) Rendered products/new.html.erb within layouts/application (140.1ms) Completed 200 OK in 187ms (Views: 180.4ms | ActiveRecord: 0.7ms)  (2.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (5.5ms) DELETE FROM "products";  (2.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:12 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:12 UTC +00:00]]  (1.8ms) commit transaction  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:12 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:12 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:12 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:12 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:16:12 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.2ms) 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 (93.0ms) Rendered products/new.html.erb within layouts/application (135.3ms) Completed 200 OK in 153ms (Views: 146.6ms | ActiveRecord: 0.9ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:16:13 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:13 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:16:13 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:16:13 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:13 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:16:13 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:13 UTC +00:00]]  (1.4ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 24ms (ActiveRecord: 2.6ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 12:16:13 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (2.9ms) Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (1.7ms) DELETE FROM "categories";  (1.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (1.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.7ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (7.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:18 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:18 UTC +00:00]]  (6.7ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:18 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:18 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:18 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:18 UTC +00:00]]  (0.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:16:27 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.2ms) 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 (88.1ms) Rendered products/new.html.erb within layouts/application (161.3ms) Completed 200 OK in 220ms (Views: 209.7ms | ActiveRecord: 1.3ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:16:27 +0200 Served asset /application.css - 200 OK (52ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:16:27 +0200 Served asset /application.js - 200 OK (120ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 12:16:28 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 12:16:30 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:16:31 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]] SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (2.2ms) commit transaction Redirected to http://127.0.0.1:59879/products Completed 302 Found in 39ms (ActiveRecord: 4.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 12:16:31 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (2.5ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (1.8ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.4ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (3.1ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (14.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (32.6ms) commit transaction  (0.1ms) begin transaction SQL (1.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (47.6ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (2.7ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 12:16:31 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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.6ms)  (279.6ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:16:31 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.5ms) Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:16:31 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:16:31 UTC +00:00]]  (1.0ms) commit transaction 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-13 12:16:31 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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: 4.1ms | ActiveRecord: 0.4ms)  (1.1ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:27 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:27 UTC +00:00]]  (36.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:27 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:27 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:27 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:27 UTC +00:00]]  (1.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:17:34 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.2ms) 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 (97.0ms) Rendered products/new.html.erb within layouts/application (135.7ms) Completed 200 OK in 162ms (Views: 152.4ms | ActiveRecord: 1.7ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:17:35 +0200 Served asset /application.css - 200 OK (35ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:17:35 +0200 Served asset /application.js - 200 OK (121ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 12:17:36 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 12:17:37 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:17:38 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (5.0ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://127.0.0.1:59955/products Completed 302 Found in 35ms (ActiveRecord: 7.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 12:17:38 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.3ms) 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 Rendered products/index.html.erb within layouts/application (3.9ms) Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.6ms) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.4ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:17:38 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.6ms) Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:17:38 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.2ms) 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-13 12:17:38 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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: 3.4ms | ActiveRecord: 0.3ms) Product Load (0.3ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:17:38 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 12:17:38 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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.3ms)  (1.0ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.9ms) DELETE FROM sqlite_sequence where name = 'products';  (2.7ms) DELETE FROM "product_has_categories";  (3.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (2.1ms) begin transaction SQL (33.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:04 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:04 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 12:19:04 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (13.0ms) Rendered categories/new.html.erb within layouts/application (20.5ms) Completed 200 OK in 37ms (Views: 36.5ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 12:19:05 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:05 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:05 UTC +00:00]]  (2.3ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 5ms (ActiveRecord: 2.8ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 12:19:05 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (1.2ms) Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.3ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:05 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:05 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 12:19:05 +0200 Processing by CategoriesController#index as HTML Category Load (0.3ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.3ms)  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (25.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:05 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:05 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 12:19:12 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.2ms) Completed 200 OK in 8ms (Views: 6.9ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:19:12 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:19:12 +0200 Served asset /application.js - 200 OK (9ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 12:19:13 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 12:19:13 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:13 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:13 UTC +00:00]]  (67.7ms) commit transaction Redirected to http://127.0.0.1:60026/categories Completed 302 Found in 71ms (ActiveRecord: 68.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 12:19:14 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (96.8ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (0.9ms) commit transaction  (0.3ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (2.3ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (0.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:19:14 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (84.7ms) Completed 200 OK in 97ms (Views: 88.4ms | ActiveRecord: 0.7ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:19:14 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (1.8ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 26ms (ActiveRecord: 3.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 12:19:14 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.3ms) 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 6ms (Views: 4.3ms | ActiveRecord: 0.5ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.4ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:14 UTC +00:00]]  (110.2ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 12:19:15 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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.9ms | ActiveRecord: 0.4ms)  (1.4ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.6ms) DELETE FROM "product_has_categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:15 UTC +00:00]]  (78.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:15 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:19:15 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 12:19:15 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (5.0ms) Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 12:19:15 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 12:19:17 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 12:19:17 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (36.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:19:17 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 10:19:17 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 10:19:17 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:17 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 10:19:17 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 10:19:17 UTC +00:00]]  (3.1ms) commit transaction Redirected to http://127.0.0.1:60026/products Completed 302 Found in 72ms (ActiveRecord: 40.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 12:19:17 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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 49ms (Views: 3.2ms | ActiveRecord: 44.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (324.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (31.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:34:03 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:34:03 UTC +00:00]]  (18.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:34:03 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:34:03 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:34:03 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 10:34:03 UTC +00:00]]  (1.7ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 12:34:11 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (13.7ms) Rendered categories/edit.html.erb within layouts/application (19.7ms) Completed 200 OK in 70ms (Views: 66.6ms | ActiveRecord: 0.9ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:34:11 +0200 Served asset /application.css - 200 OK (8ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:34:11 +0200 Served asset /application.js - 200 OK (8ms)  (29.3ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (3.2ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (4.3ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (33.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:56:26 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:56:26 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:56:26 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:56:26 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:56:26 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 10:56:26 UTC +00:00]]  (2.5ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 12:56:37 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (11.1ms) Rendered categories/edit.html.erb within layouts/application (18.8ms) Completed 200 OK in 71ms (Views: 67.3ms | ActiveRecord: 0.8ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:56:37 +0200 Served asset /application.css - 200 OK (9ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:56:37 +0200 Served asset /application.js - 200 OK (9ms)  (1.1ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (15.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:58:47 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:58:47 UTC +00:00]]  (8.4ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:58:47 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 10:58:47 UTC +00:00]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 10:58:47 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 10:58:47 UTC +00:00]]  (2.2ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 12:58:58 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (11.9ms) Rendered categories/edit.html.erb within layouts/application (19.5ms) Completed 200 OK in 73ms (Views: 68.6ms | ActiveRecord: 1.0ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 12:58:58 +0200 Served asset /application.js - 200 OK (10ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 12:58:58 +0200 Served asset /application.css - 200 OK (5ms)  (80.6ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:00:28 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:00:28 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:00:28 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:00:28 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:00:28 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:00:28 UTC +00:00]]  (1.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:00:36 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (12.0ms) Rendered categories/edit.html.erb within layouts/application (18.7ms) Completed 200 OK in 67ms (Views: 63.8ms | ActiveRecord: 0.8ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:00:37 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:00:37 +0200 Served asset /application.js - 200 OK (9ms)  (2.5ms) DELETE FROM "categories";  (1.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:01:04 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:01:04 UTC +00:00]]  (2.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:01:04 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:01:04 UTC +00:00]]  (4.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:01:04 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:01:04 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:01:12 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (12.6ms) Rendered categories/edit.html.erb within layouts/application (18.3ms) Completed 200 OK in 68ms (Views: 64.6ms | ActiveRecord: 0.8ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:01:12 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:01:12 +0200 Served asset /application.js - 200 OK (7ms)  (62.6ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (39.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:01:36 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:01:36 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:01:36 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:01:36 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:01:36 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:01:36 UTC +00:00]]  (1.2ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:01:44 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (11.4ms) Rendered categories/edit.html.erb within layouts/application (18.6ms) Completed 200 OK in 70ms (Views: 66.1ms | ActiveRecord: 1.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:01:45 +0200 Served asset /application.css - 200 OK (4ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:01:45 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=2" for 127.0.0.1 at 2012-10-13 13:01:52 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"2"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%2%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (2.3ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.7ms) DELETE FROM "products";  (0.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.5ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:03:22 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:03:22 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:03:22 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:03:22 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:03:22 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:03:22 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:03:34 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (14.1ms) Rendered categories/edit.html.erb within layouts/application (20.1ms) Completed 200 OK in 73ms (Views: 70.0ms | ActiveRecord: 0.9ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:03:34 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:03:34 +0200 Served asset /application.js - 200 OK (11ms) Started GET "/categories/token?q=2" for 127.0.0.1 at 2012-10-13 13:03:35 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"2"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%2%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:03:36 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"3"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 3, "updated_at" = '2012-10-13 11:03:36.676864' WHERE "categories"."id" = 3  (268.8ms) commit transaction Redirected to http://127.0.0.1:61130/categories Completed 302 Found in 275ms (ActiveRecord: 269.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:03:37 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.8ms) Completed 200 OK in 48ms (Views: 46.1ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 3 LIMIT 1  (196.3ms) DELETE FROM "categories";  (4.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (177.6ms) DELETE FROM "products";  (20.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.5ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (6.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:03 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:04:03 UTC +00:00]]  (58.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:04 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:04:04 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:04 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:04:04 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:04:13 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (22.4ms) Rendered categories/edit.html.erb within layouts/application (51.9ms) Completed 200 OK in 144ms (Views: 139.9ms | ActiveRecord: 1.1ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:04:13 +0200 Served asset /application.js - 200 OK (12ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:04:13 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:04:14 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:04:15 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (9.8ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:04:15.823289' WHERE "categories"."id" = 3  (4.4ms) commit transaction Redirected to http://127.0.0.1:61168/categories Completed 302 Found in 24ms (ActiveRecord: 14.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:04:15 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.2ms) Completed 200 OK in 34ms (Views: 32.5ms | ActiveRecord: 0.2ms) Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (2.5ms) DELETE FROM "product_has_categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (324.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:40 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:04:40 UTC +00:00]]  (245.4ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:04:42 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (6.5ms) Completed 200 OK in 204ms (Views: 201.8ms | ActiveRecord: 0.2ms)  (11.7ms) DELETE FROM "categories";  (18.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (4.5ms) DELETE FROM "products";  (3.7ms) DELETE FROM sqlite_sequence where name = 'products';  (101.0ms) DELETE FROM "product_has_categories";  (1.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00]]  (9.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:04:43 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (44.5ms) Completed 200 OK in 169ms (Views: 168.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:04:43 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00]]  (7.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 27ms (ActiveRecord: 8.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:04:43 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (26.9ms) DELETE FROM "categories";  (22.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (4.7ms) DELETE FROM "products";  (56.6ms) DELETE FROM sqlite_sequence where name = 'products';  (28.6ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:04:43 UTC +00:00]]  (22.0ms) commit transaction Category Load (5.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:05:00 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (6.2ms) Completed 200 OK in 13ms (Views: 9.5ms | ActiveRecord: 1.0ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:05:00 +0200 Served asset /application.js - 200 OK (11ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:05:00 +0200 Served asset /application.css - 200 OK (4ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:05:02 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:05:02 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:05:02.857287' WHERE "categories"."id" = 3  (2.8ms) commit transaction Redirected to http://127.0.0.1:61259/categories Completed 302 Found in 10ms (ActiveRecord: 3.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:05:02 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:05:03 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (4.1ms) Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.3ms)  (1.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:05:03 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:05:03 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (3.3ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:05:03 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) 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-13 13:05:04 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:04 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:05:04 UTC +00:00]]  (2.7ms) commit transaction Redirected to http://127.0.0.1:61259/categories Completed 302 Found in 7ms (ActiveRecord: 3.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:05:04 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.3ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.2ms) begin transaction SQL (11.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00]]  (3.2ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:05:46 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (34.9ms) Rendered categories/new.html.erb within layouts/application (46.1ms) Completed 200 OK in 136ms (Views: 135.4ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:05:46 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00]]  (1.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 10ms (ActiveRecord: 2.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:05:46 +0200 Processing by CategoriesController#index as HTML Category Load (0.4ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (2.8ms) Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.4ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (15.0ms) DELETE FROM "categories";  (3.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (4.3ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (5.4ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00]]  (13.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (1.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:05:46 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:05:58 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (13.5ms) Completed 200 OK in 23ms (Views: 18.2ms | ActiveRecord: 1.2ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:05:58 +0200 Served asset /application.css - 200 OK (8ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:05:58 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:05:59 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:06:00 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:06:00.666368' WHERE "categories"."id" = 3  (63.0ms) commit transaction Redirected to http://127.0.0.1:61346/categories Completed 302 Found in 68ms (ActiveRecord: 63.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:01 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (409.8ms) DELETE FROM "categories";  (463.6ms) DELETE FROM sqlite_sequence where name = 'categories';  (30.3ms) DELETE FROM "products";  (5.8ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:03 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:03 UTC +00:00]]  (0.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:06:03 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (3.4ms) Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:06:04 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:06:04 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (43.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:04 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:06:04 UTC +00:00]]  (86.3ms) commit transaction Redirected to http://127.0.0.1:61346/categories Completed 302 Found in 132ms (ActiveRecord: 129.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:05 +0200 Processing by CategoriesController#index as HTML Category Load (0.3ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 5ms (Views: 3.1ms | ActiveRecord: 0.3ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (221.3ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (22.4ms) DELETE FROM "product_has_categories";  (23.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (11.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:05 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:05 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:05 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms)  (0.8ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.8ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:05 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:05 UTC +00:00]]  (12.8ms) commit transaction  (0.1ms) begin transaction SQL (229.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:05 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:05 UTC +00:00]]  (12.3ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:06 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:06:06 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:06:06 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (4.6ms) Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.3ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:06:06 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.0ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:06:06.256495' WHERE "categories"."id" = 3  (8.2ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 11ms (ActiveRecord: 8.6ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:06 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 37ms (Views: 36.0ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (0.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (18.4ms) begin transaction SQL (13.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:33 UTC +00:00]]  (6.7ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:33 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (6.3ms) Completed 200 OK in 107ms (Views: 100.7ms | ActiveRecord: 0.2ms)  (3.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (3.0ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (2.8ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:33 UTC +00:00]]  (15.4ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:06:33 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (29.5ms) Completed 200 OK in 96ms (Views: 95.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:06:34 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00]]  (2.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 7ms (ActiveRecord: 3.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:34 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (6.5ms) DELETE FROM "categories";  (2.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (2.1ms) DELETE FROM "products";  (0.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00]]  (4.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00]]  (3.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:06:34 UTC +00:00]]  (12.4ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:06:40 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (6.2ms) Completed 200 OK in 12ms (Views: 9.4ms | ActiveRecord: 0.7ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:06:40 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:06:40 +0200 Served asset /application.js - 200 OK (7ms)  (2.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.4ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:40 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:40 UTC +00:00]]  (217.6ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:41 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:41 UTC +00:00]]  (7.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:41 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:06:41 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:06:41 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (10.8ms) Completed 200 OK in 15ms (Views: 13.1ms | ActiveRecord: 0.5ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:06:41 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:06:41.262247' WHERE "categories"."id" = 3  (5.2ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 17ms (ActiveRecord: 5.9ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:41 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (6.8ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (5.7ms) DELETE FROM "products";  (1.7ms) DELETE FROM sqlite_sequence where name = 'products';  (7.6ms) DELETE FROM "product_has_categories";  (2.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (7.4ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:41 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:06:41 UTC +00:00]]  (2.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:06:41 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (5.3ms) Completed 200 OK in 9ms (Views: 8.9ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:06:42 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:06:43 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:06:43 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:06:43 UTC +00:00]]  (136.7ms) commit transaction Redirected to http://127.0.0.1:61427/categories Completed 302 Found in 141ms (ActiveRecord: 137.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:06:43 +0200 Processing by CategoriesController#index as HTML Category Load (0.4ms) SELECT "categories".* FROM "categories" Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.4ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (29.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (24.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00]]  (1.5ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:07:04 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (5.9ms) Completed 200 OK in 52ms (Views: 49.7ms | ActiveRecord: 0.2ms)  (73.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.7ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (2.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:07:04 UTC +00:00]]  (1.6ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:07:05 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (8.8ms) Completed 200 OK in 16ms (Views: 14.6ms | ActiveRecord: 0.3ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:07:05 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:07:05.083486' WHERE "categories"."id" = 3  (1.5ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 6ms (ActiveRecord: 2.0ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:07:05 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms) Category Load (0.7ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.3ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.4ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:05 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:05 UTC +00:00]]  (1.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:07:10 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (6.2ms) Completed 200 OK in 12ms (Views: 11.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:07:10 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:07:10 +0200 Served asset /application.js - 200 OK (10ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:07:11 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 0.8ms)  (6.9ms) DELETE FROM "categories";  (44.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:14 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:14 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:14 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:14 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:14 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:07:14 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:07:14 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (3.6ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:07:14 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:07:15 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:07:15.741056' WHERE "categories"."id" = 3  (0.7ms) commit transaction Redirected to http://127.0.0.1:61485/categories Completed 302 Found in 5ms (ActiveRecord: 1.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:07:15 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:15 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:07:15 UTC +00:00]]  (34.4ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:07:15 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.1ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:07:15 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:07:15 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:07:15 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 6ms (ActiveRecord: 2.0ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:07:15 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.1ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:23 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:23 UTC +00:00]]  (2.4ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:08:28 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (47.6ms) Rendered categories/new.html.erb within layouts/application (55.4ms) Completed 200 OK in 71ms (Views: 70.1ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:08:28 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:08:28 +0200 Served asset /application.js - 200 OK (6ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:08:29 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:08:30 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00]]  (88.4ms) commit transaction Redirected to http://127.0.0.1:61606/categories Completed 302 Found in 94ms (ActiveRecord: 89.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:08:30 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (2.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (2.7ms) DELETE FROM "categories";  (3.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:08:30 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.2ms)  (1.8ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.5ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:08:30 UTC +00:00]]  (1.6ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:08:30 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (4.5ms) Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:08:31 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (1.2ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:08:32.273311' WHERE "categories"."id" = 3  (93.3ms) commit transaction Redirected to http://127.0.0.1:61606/categories Completed 302 Found in 101ms (ActiveRecord: 94.8ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.4ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (3.9ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.2ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:08:32.657285' WHERE "categories"."id" = 3  (0.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 1.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00]]  (1.0ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (2.4ms) Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:08:32 UTC +00:00]]  (0.9ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 3ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:08:32 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.8ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (1.6ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.7ms) Completed 200 OK in 53ms (Views: 51.1ms | ActiveRecord: 0.1ms)  (1.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.7ms) DELETE FROM "products";  (0.8ms) DELETE FROM sqlite_sequence where name = 'products';  (1.6ms) DELETE FROM "product_has_categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (1.7ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (16.9ms) Completed 200 OK in 48ms (Views: 47.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 1.7ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.3ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.6ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (2.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (1.7ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (3.9ms) Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.3ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:15:30.823183' WHERE "categories"."id" = 3  (1.5ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 7ms (ActiveRecord: 2.0ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:15:30 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.7ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:30 UTC +00:00]]  (1.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:15:37 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (3.9ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:15:37 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:15:37 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:15:38 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 0.7ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:15:39 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (7.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:39 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:15:39 UTC +00:00]]  (29.0ms) commit transaction Redirected to http://127.0.0.1:61698/categories Completed 302 Found in 48ms (ActiveRecord: 36.7ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:15:39 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (940.6ms) DELETE FROM "categories";  (48.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (83.9ms) DELETE FROM "products";  (64.6ms) DELETE FROM sqlite_sequence where name = 'products';  (36.1ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:40 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:40 UTC +00:00]]  (29.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:40 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:15:40 UTC +00:00]]  (24.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:15:40 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:15:40 UTC +00:00]]  (60.1ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:15:41 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (6.8ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.7ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:15:41 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:15:42 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:15:42.614262' WHERE "categories"."id" = 3  (0.7ms) commit transaction Redirected to http://127.0.0.1:61698/categories Completed 302 Found in 4ms (ActiveRecord: 1.1ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:15:42 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.1ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:32:33 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (9.4ms) Rendered categories/edit.html.erb within layouts/application (14.7ms) Completed 200 OK in 34ms (Views: 32.1ms | ActiveRecord: 0.4ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:32:33 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:32:33.765584' WHERE "categories"."id" = 3  (1.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 6ms (ActiveRecord: 2.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:32:33 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (2.0ms) Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.2ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.3ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:32:33 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (2.7ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:32:33 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.4ms) 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-13 13:32:33 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.7ms) DELETE FROM "categories";  (1.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.5ms) DELETE FROM "products";  (0.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.9ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:32:33 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (1.3ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.6ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.5ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:33 UTC +00:00]]  (1.2ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:32:39 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (6.3ms) Completed 200 OK in 13ms (Views: 9.4ms | ActiveRecord: 1.1ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:32:39 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:32:39 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:32:39 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:32:40 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:32:40.689199' WHERE "categories"."id" = 3  (142.8ms) commit transaction Redirected to http://127.0.0.1:61807/categories Completed 302 Found in 147ms (ActiveRecord: 143.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:32:41 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (185.8ms) DELETE FROM "categories";  (1.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:41 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:41 UTC +00:00]]  (1.2ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:32:41 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.3ms) Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:32:42 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) 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-13 13:32:42 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (4.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:42 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:42 UTC +00:00]]  (4.1ms) commit transaction Redirected to http://127.0.0.1:61807/categories Completed 302 Found in 11ms (ActiveRecord: 8.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:32:43 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.3ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (2.4ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (2.2ms) commit transaction  (1.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (21.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (1.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:53 UTC +00:00]]  (1.3ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:32:53 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (20.7ms) Completed 200 OK in 78ms (Views: 76.8ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:32:54 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (2.0ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 9ms (ActiveRecord: 3.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:32:54 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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 6ms (Views: 4.3ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.7ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.9ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.8ms) DELETE FROM "product_has_categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.3ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.7ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.9ms) commit transaction  (1.6ms) DELETE FROM "categories";  (1.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (2.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.5ms) DELETE FROM "product_has_categories";  (2.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.6ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.7ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:32:54 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.1ms) 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: 3.1ms | ActiveRecord: 0.3ms)  (1.7ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (1.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.5ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:32:54 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:33:00 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) 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 (10.8ms) Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 1.2ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:33:00 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:33:00 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:33:00 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') 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-13 13:33:02 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:33:02 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:02 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:33:02 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:33:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:33:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:02 UTC +00:00]]  (4.3ms) commit transaction Redirected to http://127.0.0.1:61879/products Completed 302 Found in 13ms (ActiveRecord: 5.9ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:33:02 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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.9ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.3ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:45 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:45 UTC +00:00]]  (157.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:45 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:45 UTC +00:00]]  (125.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:45 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:45 UTC +00:00]]  (1.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:33:46 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (79.2ms) Rendered products/new.html.erb within layouts/application (85.4ms) Completed 200 OK in 133ms (Views: 126.5ms | ActiveRecord: 0.7ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:33:46 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]]  (27.5ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 59ms (ActiveRecord: 29.0ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:33:46 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (6.7ms) Completed 200 OK in 11ms (Views: 9.0ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (33.9ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (2.1ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]]  (24.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]]  (5.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]]  (1.5ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:46 UTC +00:00]]  (8.8ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:33:55 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.3ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (13.6ms) Completed 200 OK in 21ms (Views: 16.7ms | ActiveRecord: 1.8ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:33:55 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:33:55 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:33:56 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:33:57 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:33:58 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00]]  (0.9ms) commit transaction Redirected to http://127.0.0.1:61941/products Completed 302 Found in 24ms (ActiveRecord: 2.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:33:58 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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.8ms | ActiveRecord: 0.3ms) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.7ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:33:58 UTC +00:00]]  (0.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:33:58 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.0ms) Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:33:59 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:34:00 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:34:01 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (4.6ms) commit transaction Redirected to http://127.0.0.1:61941/products Completed 302 Found in 14ms (ActiveRecord: 6.0ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:34:01 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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.9ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (3.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:34:01 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 6ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (1.9ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:34:01 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.7ms) Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.5ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:34:01 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:34:01 UTC +00:00]]  (1.1ms) 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-13 13:34:01 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.1ms) 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.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00]]  (2.4ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00]]  (1.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:35:55 UTC +00:00]]  (1.6ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:36:01 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (60.1ms) Rendered products/edit.html.erb within layouts/application (67.0ms) Completed 200 OK in 87ms (Views: 80.2ms | ActiveRecord: 1.5ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:36:02 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:36:02 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:36:02 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:36:04 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:36:04 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.6ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:36:04 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:04 UTC +00:00]]  (2.1ms) commit transaction Redirected to http://127.0.0.1:62056/products Completed 302 Found in 15ms (ActiveRecord: 3.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:36:04 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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 Rendered products/index.html.erb within layouts/application (2.9ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:04 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:05 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:05 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:05 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:05 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:36:05 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.5ms) Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:36:05 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:36:06 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:36:07 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]]  (3.3ms) commit transaction Redirected to http://127.0.0.1:62056/products Completed 302 Found in 14ms (ActiveRecord: 5.5ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:36:07 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.0ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:07 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:36:07 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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: 3.2ms | ActiveRecord: 0.3ms)  (118.4ms) DELETE FROM "categories";  (375.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (625.1ms) DELETE FROM "products";  (509.8ms) DELETE FROM sqlite_sequence where name = 'products';  (132.6ms) DELETE FROM "product_has_categories";  (7.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:09 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:09 UTC +00:00]]  (467.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00]]  (364.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00]]  (2.8ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:10 UTC +00:00]]  (395.0ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:36:11 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (6.7ms) Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.5ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:36:11 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]]  (9.9ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 16ms (ActiveRecord: 10.7ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:36:11 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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 6ms (Views: 4.3ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (15.5ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (22.2ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]]  (1.4ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:36:11 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.2ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:36:11 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:36:11 UTC +00:00]]  (341.2ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 348ms (ActiveRecord: 342.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:36:11 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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.3ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (20.6ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (8.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:56 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:56 UTC +00:00]]  (14.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:56 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:56 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:56 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:56 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]] SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.5ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (28.3ms) Completed 200 OK in 98ms (Views: 96.2ms | ActiveRecord: 0.5ms)  (2.8ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (4.8ms) DELETE FROM sqlite_sequence where name = 'products';  (1.5ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (3.8ms) commit transaction  (0.1ms) begin transaction SQL (3.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (3.7ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) 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 (16.1ms) Completed 200 OK in 27ms (Views: 25.7ms | ActiveRecord: 0.4ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.5ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 15ms (ActiveRecord: 4.0ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.5ms) 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 7ms (Views: 5.9ms | ActiveRecord: 0.7ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (4.2ms) DELETE FROM "categories";  (1.6ms) DELETE FROM sqlite_sequence where name = 'categories';  (4.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (3.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.0ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (8.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (4.5ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.3ms) 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  (0.3ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (20.6ms) Completed 200 OK in 27ms (Views: 24.2ms | ActiveRecord: 1.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.4ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (7.6ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 83ms (ActiveRecord: 9.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:37:57 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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 9ms (Views: 7.2ms | ActiveRecord: 0.4ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.8ms) DELETE FROM "categories";  (1.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (3.9ms) DELETE FROM "products";  (1.9ms) DELETE FROM sqlite_sequence where name = 'products';  (2.6ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.1ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:37:57 UTC +00:00]]  (2.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:38:05 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.2ms) 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 (9.4ms) Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 1.1ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:38:05 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:38:05 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:38:06 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:38:07 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:38:08 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]] SQL (0.7ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]]  (5.3ms) commit transaction Redirected to http://127.0.0.1:62174/products Completed 302 Found in 17ms (ActiveRecord: 7.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:38:08 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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.2ms | ActiveRecord: 0.5ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.4ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:38:08 UTC +00:00]]  (1.5ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:38:08 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Rendered products/_form.html.erb (8.1ms) Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.8ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:38:08 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) 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-13 13:38:10 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) 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-13 13:38:10 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:38:10 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:38:10 UTC +00:00]]  (91.8ms) commit transaction Redirected to http://127.0.0.1:62174/products Completed 302 Found in 102ms (ActiveRecord: 93.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:38:11 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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: 3.2ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (7.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00]]  (6.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00]]  (4.5ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:04 UTC +00:00]]  (2.8ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:05 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (31.4ms) Completed 200 OK in 222ms (Views: 218.9ms | ActiveRecord: 0.4ms)  (21.5ms) DELETE FROM "categories";  (4.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (4.0ms) DELETE FROM "products";  (2.8ms) DELETE FROM sqlite_sequence where name = 'products';  (13.0ms) DELETE FROM "product_has_categories";  (10.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:05 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:05 UTC +00:00]]  (9.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:05 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:05 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:05 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:05 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:39:11 +0200 Processing by ProductsController#new as HTML  (0.3ms) 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  (0.2ms) 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 (26.4ms) Completed 200 OK in 45ms (Views: 42.3ms | ActiveRecord: 1.3ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:39:11 +0200 Served asset /application.js - 200 OK (17ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:39:11 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:39:12 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:39:13 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:39:14 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:14 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:39:14 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:14 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:14 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:14 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:14 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://127.0.0.1:62277/products Completed 302 Found in 13ms (ActiveRecord: 2.7ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:14 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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.5ms | ActiveRecord: 0.4ms) Product Load (0.3ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (5.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (3.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (4.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (5.6ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (23.3ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.3ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (23.6ms) Completed 200 OK in 36ms (Views: 33.1ms | ActiveRecord: 1.0ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (4.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (3.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.4ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (4.7ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 57ms (ActiveRecord: 13.5ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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 6ms (Views: 4.7ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.4ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (4.0ms) DELETE FROM "products";  (1.6ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (3.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (1.8ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (1.5ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.5ms) 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 (9.5ms) Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.7ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (1.7ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 26ms (ActiveRecord: 3.6ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#index as HTML Product Load (0.3ms) SELECT "products".* FROM "products"  (0.2ms) 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 6ms (Views: 4.4ms | ActiveRecord: 0.5ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (2.2ms) DELETE FROM "categories";  (5.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (5.6ms) DELETE FROM "products";  (5.4ms) DELETE FROM sqlite_sequence where name = 'products';  (3.7ms) DELETE FROM "product_has_categories";  (3.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (0.9ms) commit transaction  (3.0ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (1.7ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:15 UTC +00:00]]  (4.8ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:39:15 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (68.5ms) Completed 200 OK in 73ms (Views: 70.6ms | ActiveRecord: 0.9ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:39:16 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:39:17 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) 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-13 13:39:18 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.7ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (5.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:39:18 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:18 UTC +00:00]]  (108.6ms) commit transaction Redirected to http://127.0.0.1:62277/products Completed 302 Found in 124ms (ActiveRecord: 115.3ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:18 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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: 3.1ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (281.3ms) DELETE FROM "categories";  (4.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (20.2ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (14.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00]]  (2.0ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00]]  (7.3ms) commit transaction Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00]] SQL (2.9ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:41 UTC +00:00]]  (1.8ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:39:48 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (59.9ms) Rendered products/edit.html.erb within layouts/application (66.6ms) Completed 200 OK in 85ms (Views: 80.8ms | ActiveRecord: 1.3ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:39:48 +0200 Served asset /application.css - 200 OK (4ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:39:48 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:39:48 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:39:50 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:39:50 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.6ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:39:50 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:50 UTC +00:00]]  (2.1ms) commit transaction Redirected to http://127.0.0.1:62390/products Completed 302 Found in 16ms (ActiveRecord: 3.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:50 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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 Rendered products/index.html.erb within layouts/application (2.9ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms) Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.2ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:39:51 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.3ms) Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:39:51 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (2.2ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 8ms (ActiveRecord: 3.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:51 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.1ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.4ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.4ms) DELETE FROM "products";  (1.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (1.4ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:51 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:39:51 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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.5ms) Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:39:51 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:39:53 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:39:53 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:53 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:39:53 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:53 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:53 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:53 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:53 UTC +00:00]]  (8.7ms) commit transaction Redirected to http://127.0.0.1:62390/products Completed 302 Found in 18ms (ActiveRecord: 10.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:53 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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: 4.2ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.4ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.2ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (1.5ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:39:54 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (7.1ms) Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.7ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:39:54 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 7ms (ActiveRecord: 2.0ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:54 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.1ms) 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.4ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.7ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:39:54 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:39:54 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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: 4.1ms | ActiveRecord: 0.3ms)  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (31.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00]]  (3.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (1.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00]]  (2.5ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00]] SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:29 UTC +00:00]]  (1.5ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:40:35 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (60.3ms) Rendered products/edit.html.erb within layouts/application (66.7ms) Completed 200 OK in 84ms (Views: 79.4ms | ActiveRecord: 1.3ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:40:36 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:40:36 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:40:36 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:40:37 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) 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-13 13:40:38 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]]  (1.0ms) commit transaction Redirected to http://127.0.0.1:62508/products Completed 302 Found in 16ms (ActiveRecord: 2.3ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:40:38 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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 Rendered products/index.html.erb within layouts/application (2.9ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:38 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.0ms) Completed 200 OK in 9ms (Views: 7.3ms | ActiveRecord: 0.5ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.9ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 10ms (ActiveRecord: 3.0ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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: 3.6ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.6ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (2.4ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (2.3ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.0ms | ActiveRecord: 0.3ms)  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) 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.3ms) Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.9ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 9ms (ActiveRecord: 2.9ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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.9ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:40:39 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:40:39 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.1ms) Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:40:40 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:40:41 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:40:42 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:40:42 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:40:42 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:40:42 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:42 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:40:42 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:40:42 UTC +00:00]]  (305.9ms) commit transaction Redirected to http://127.0.0.1:62508/products Completed 302 Found in 315ms (ActiveRecord: 307.3ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:40:42 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.1ms) 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.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (231.3ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (140.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:36 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:36 UTC +00:00]]  (60.4ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00]]  (2.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:42:37 UTC +00:00]]  (1.4ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:42:42 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (56.8ms) Rendered products/edit.html.erb within layouts/application (63.6ms) Completed 200 OK in 83ms (Views: 78.1ms | ActiveRecord: 1.3ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:42:42 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:42:42 +0200 Served asset /application.js - 200 OK (9ms)  (1.7ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:45 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:45 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:45 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:45 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:45 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:45 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:42:45 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.1ms) Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.3ms)  (1.8ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:42:47 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.9ms) Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.6ms)  (1.6ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.1ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (0.7ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:42:47 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (5.7ms) Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.3ms)  (1.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.5ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:42:47 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:42:47 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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 6ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (1.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (2.2ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (30.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00]]  (9.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00]]  (4.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00]]  (7.1ms) commit transaction Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00]] SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:33 UTC +00:00]]  (3.8ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:43:34 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (23.8ms) Completed 200 OK in 99ms (Views: 96.9ms | ActiveRecord: 0.4ms)  (86.2ms) DELETE FROM "categories";  (7.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (3.6ms) DELETE FROM "products";  (5.9ms) DELETE FROM sqlite_sequence where name = 'products';  (13.2ms) DELETE FROM "product_has_categories";  (10.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:34 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:34 UTC +00:00]]  (1.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:34 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:34 UTC +00:00]]  (10.5ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:34 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:34 UTC +00:00]]  (2.7ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:43:41 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (18.2ms) Completed 200 OK in 27ms (Views: 25.5ms | ActiveRecord: 0.8ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:43:41 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:43:41 +0200 Served asset /application.js - 200 OK (6ms)  (255.4ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.9ms) DELETE FROM "products";  (2.1ms) DELETE FROM sqlite_sequence where name = 'products';  (2.2ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.7ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:43:44 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL Rendered products/_form.html.erb (7.1ms) Completed 200 OK in 10ms (Views: 8.9ms | ActiveRecord: 0.4ms)  (0.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.4ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.5ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:43:44 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Rendered products/_form.html.erb (8.3ms) Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.7ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:43:44 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.4ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (2.3ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 13ms (ActiveRecord: 3.3ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:43:44 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.1ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.8ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.4ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:44 UTC +00:00]]  (1.9ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:43:44 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.3ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Rendered products/_form.html.erb (9.9ms) Completed 200 OK in 15ms (Views: 11.6ms | ActiveRecord: 1.3ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:43:45 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:43:46 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:43:47 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.6ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:43:47 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:43:47 UTC +00:00]]  (3.5ms) commit transaction Redirected to http://127.0.0.1:62804/products Completed 302 Found in 12ms (ActiveRecord: 4.9ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:43:47 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (275.5ms) DELETE FROM "categories";  (167.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (109.6ms) DELETE FROM "products";  (1.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (2.4ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]] SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.6ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:46:32 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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 Rendered products/index.html.erb within layouts/application (14.3ms) Completed 200 OK in 55ms (Views: 53.9ms | ActiveRecord: 0.3ms)  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.2ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:46:32 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) 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 (10.6ms) Completed 200 OK in 17ms (Views: 15.8ms | ActiveRecord: 0.4ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:46:32 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.9ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 8ms (ActiveRecord: 2.8ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:46:32 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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.6ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.8ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.5ms) DELETE FROM "products";  (1.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.8ms) DELETE FROM "product_has_categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.4ms) commit transaction  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.3ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:32 UTC +00:00]]  (1.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:46:38 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.8ms) 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 (14.1ms) Completed 200 OK in 17ms (Views: 14.9ms | ActiveRecord: 1.9ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:46:38 +0200 Served asset /application.css - 200 OK (7ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:46:38 +0200 Served asset /application.js - 200 OK (8ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:46:39 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-13 13:46:40 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:46:41 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]] SQL (0.6ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (3.0ms) commit transaction Redirected to http://127.0.0.1:62947/products Completed 302 Found in 14ms (ActiveRecord: 5.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:46:41 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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 6ms (Views: 4.1ms | ActiveRecord: 0.5ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.2ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:46:41 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (7.3ms) Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.8ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:46:41 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.3ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 13ms (ActiveRecord: 2.5ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:46:41 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.1ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.8ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:41 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:46:41 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.2ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.7ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:46:42 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) 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-13 13:46:43 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:46:44 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:46:44 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:46:44 UTC +00:00]]  (8.9ms) commit transaction Redirected to http://127.0.0.1:62947/products Completed 302 Found in 19ms (ActiveRecord: 10.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:46:44 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.1ms) 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) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.8ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (29.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00]]  (2.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00]]  (1.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:25 UTC +00:00]]  (2.1ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:47:30 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (60.3ms) Rendered products/edit.html.erb within layouts/application (68.7ms) Completed 200 OK in 88ms (Views: 82.8ms | ActiveRecord: 1.5ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-13 13:47:30 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-13 13:47:30 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-13 13:47:31 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:47:32 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.6ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://127.0.0.1:63054/products Completed 302 Found in 17ms (ActiveRecord: 2.6ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.2ms) 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 Rendered products/index.html.erb within layouts/application (3.4ms) Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.3ms) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.3ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (5.1ms) Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.0ms) commit transaction 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-13 13:47:33 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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.9ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.2ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.8ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.1ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) 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 (10.9ms) Completed 200 OK in 14ms (Views: 12.3ms | ActiveRecord: 0.9ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:33 UTC +00:00]]  (1.3ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 12ms (ActiveRecord: 2.8ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:47:33 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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: 4.3ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.8ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:34 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:34 UTC +00:00]]  (3.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:34 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:34 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:34 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:34 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-13 13:47:34 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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.3ms) Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-13 13:47:34 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) 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-13 13:47:35 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-13 13:47:36 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:36 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 11:47:36 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:47:36 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:36 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 11:47:36 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:36 UTC +00:00]]  (7.9ms) commit transaction Redirected to http://127.0.0.1:63054/products Completed 302 Found in 17ms (ActiveRecord: 9.5ms) Started GET "/products" for 127.0.0.1 at 2012-10-13 13:47:37 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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: 3.0ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.8ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.4ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (2.3ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-13 13:47:37 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 6ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (1.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:37 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:47:37 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (8.2ms) Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.5ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-13 13:47:38 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:47:38 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (271.7ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:47:38.886296' WHERE "categories"."id" = 3  (70.8ms) commit transaction Redirected to http://127.0.0.1:63054/categories Completed 302 Found in 347ms (ActiveRecord: 342.7ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:47:39 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (38.9ms) DELETE FROM "categories";  (568.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (2.5ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (145.0ms) DELETE FROM "product_has_categories";  (244.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00]]  (0.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:47:40 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (3.5ms) Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-13 13:47:40 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00]]  (1.0ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 1.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:47:40 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (247.7ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-13 13:47:40 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (3.6ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.3ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-13 13:47:40 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 11:47:40.904379' WHERE "categories"."id" = 3  (1.2ms) commit transaction 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-13 13:47:40 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.7ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.5ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:40 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-13 13:47:41 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.2ms) Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-13 13:47:42 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) 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-13 13:47:43 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:43 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 11:47:43 UTC +00:00]]  (1.9ms) commit transaction Redirected to http://127.0.0.1:63054/categories Completed 302 Found in 6ms (ActiveRecord: 2.6ms) Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:47:43 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (27.1ms) DELETE FROM "categories";  (7.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (30.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 11:47:43 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 11:47:43 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-13 13:47:43 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.2ms)  (0.9ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (22.4ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (7.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:52 UTC +00:00]]  (1.0ms) commit transaction  (0.8ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (22.9ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (11.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (3.2ms) commit transaction  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (2.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (0.8ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:12:53 +0200 Processing by ItemsController#new as HTML Completed 500 Internal Server Error in 2ms  (1.2ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (3.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (1.1ms) commit transaction  (2.5ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (1.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (7.6ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (3.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:12:53 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:13:02 +0200 Processing by ItemsController#new as HTML Completed 500 Internal Server Error in 1ms  (2.2ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:04 UTC +00:00]]  (1.0ms) commit transaction  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories'; Connecting to database specified by database.yml  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateCategories (20121012100526) Migrating to CreateProducts (20121012235444) Migrating to CreateProductHasCategories (20121012235509) Migrating to CreateItems (20121013214019)  (0.0ms) select sqlite_version(*)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "category_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121013214019')  (2.3ms) commit transaction  (0.3ms) select sqlite_version(*)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  (0.0ms) PRAGMA index_list("categories")  (0.0ms) PRAGMA index_list("items")  (0.0ms) PRAGMA index_list("product_has_categories")  (0.0ms) PRAGMA index_list("products") Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00]]  (2.3ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:21 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:13:23 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (67.4ms) Rendered items/new.html.erb within layouts/application (72.5ms) Completed 200 OK in 121ms (Views: 113.9ms | ActiveRecord: 0.5ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:13:24 +0200 Compiled token-input-facebook.css (0ms) (pid 17853) Compiled application.css (7ms) (pid 17853) Served asset /application.css - 200 OK (15ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:13:24 +0200 Compiled jquery.js (4ms) (pid 17853) Compiled jquery_ujs.js (0ms) (pid 17853) Compiled jquery.tokeninput.js (26ms) (pid 17853) Compiled application.js (44ms) (pid 17853) Served asset /application.js - 200 OK (53ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:13:24 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.3ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://127.0.0.1:52870/items Completed 302 Found in 8ms (ActiveRecord: 2.2ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Rendered items/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]  (0.8ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]  (0.9ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:13:25 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (3.7ms) Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:13:25 UTC +00:00]]  (1.3ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 4ms (ActiveRecord: 1.8ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:13:25 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (15.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.2ms) commit transaction  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.0ms) commit transaction  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.1ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:26 UTC +00:00]]  (1.0ms) commit transaction  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.3ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]  (2.2ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:13:59 UTC +00:00]]  (1.3ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 00:13:59 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items"  Rendered items/index.html.erb within layouts/application (28.6ms) Completed 200 OK in 39ms (Views: 37.7ms | ActiveRecord: 0.2ms)  (1.8ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:00 UTC +00:00]]  (1.4ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:03 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (85.7ms) Completed 200 OK in 95ms (Views: 94.4ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:14:03 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:14:03 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:14:03 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (1.4ms) commit transaction Redirected to http://127.0.0.1:52937/items Completed 302 Found in 5ms (ActiveRecord: 2.1ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.4ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.3ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:04 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (3.9ms) Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (1.6ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 4ms (ActiveRecord: 2.1ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:04 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.1ms) DELETE FROM "categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.5ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:04 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]  (1.6ms) commit transaction  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.7ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]  (1.4ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:05 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:14:05 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (5.1ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:14:05 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:14:06 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:14:06.454102' WHERE "items"."id" = 1  (1.0ms) commit transaction Redirected to http://127.0.0.1:52937/items Completed 302 Found in 6ms (ActiveRecord: 1.5ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:06 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms) Item Load (0.3ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]  (2.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:25 UTC +00:00]]  (1.2ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:14:29 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (63.4ms) Rendered items/edit.html.erb within layouts/application (70.4ms) Completed 200 OK in 85ms (Views: 82.2ms | ActiveRecord: 0.9ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:14:29 +0200 Served asset /application.css - 200 OK (5ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:14:29 +0200 Served asset /application.js - 200 OK (6ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:14:30 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:14:31 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:14:31.234759' WHERE "items"."id" = 1  (116.3ms) commit transaction Redirected to http://127.0.0.1:53017/items Completed 302 Found in 122ms (ActiveRecord: 116.9ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#index as HTML Item Load (0.4ms) SELECT "items".* FROM "items"  Rendered items/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.4ms) Item Load (0.3ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (33.4ms) DELETE FROM "categories";  (2.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (3.9ms) Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.9ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 4ms (ActiveRecord: 2.3ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.2ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.7ms) commit transaction  (0.3ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (4.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (5.0ms) Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.2ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:14:32.447777' WHERE "items"."id" = 1  (1.4ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 4ms (ActiveRecord: 1.8ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.2ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:32 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:14:32 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (4.9ms) Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:14:33 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:14:33 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:33 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:14:33 UTC +00:00]]  (1.0ms) commit transaction Redirected to http://127.0.0.1:53017/items Completed 302 Found in 4ms (ActiveRecord: 1.6ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:33 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.4ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:14:34 UTC +00:00]]  (1.2ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 00:14:34 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (2.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (2.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (0.9ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 00:19:19 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items"  Rendered items/index.html.erb within layouts/application (28.5ms) Completed 200 OK in 39ms (Views: 37.9ms | ActiveRecord: 0.2ms)  (1.4ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.7ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.6ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.6ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:19:19 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (99.7ms) Completed 500 Internal Server Error in 104ms  (1.9ms) DELETE FROM "categories";  (2.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.8ms) DELETE FROM "products";  (0.8ms) DELETE FROM sqlite_sequence where name = 'products';  (2.1ms) DELETE FROM "product_has_categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.7ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.8ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.6ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:19 UTC +00:00]]  (1.9ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:19:23 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (25.3ms) Completed 500 Internal Server Error in 27ms  (2.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:19:25 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:19:26 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Rendered items/_form.html.erb (48.6ms) Completed 500 Internal Server Error in 52ms  (1.5ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:19:26 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:19:26 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Rendered items/_form.html.erb (21.9ms) Completed 500 Internal Server Error in 24ms  (2.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00]]  (2.2ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:51 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Rendered categories/index.html.erb within layouts/application (3.8ms) Completed 200 OK in 42ms (Views: 40.4ms | ActiveRecord: 0.1ms)  (1.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:51 UTC +00:00]]  (0.8ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:20:55 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (19.2ms) Completed 200 OK in 66ms (Views: 65.4ms | ActiveRecord: 0.0ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:20:55 +0200 Served asset /application.css - 200 OK (6ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:20:55 +0200 Served asset /application.js - 200 OK (7ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-14 00:20:56 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%') Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 0.5ms) Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:20:56 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:56 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:56 UTC +00:00]]  (60.7ms) commit transaction Redirected to http://127.0.0.1:53294/categories Completed 302 Found in 64ms (ActiveRecord: 61.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.2ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (1.5ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.1ms) Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 4ms (ActiveRecord: 1.5ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (4.0ms) Completed 200 OK in 49ms (Views: 47.2ms | ActiveRecord: 0.4ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:20:57.336934' WHERE "categories"."id" = 3  (0.9ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 5ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:57 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:20:57 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (5.8ms) Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-14 00:20:58 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:20:58 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:20:58.872293' WHERE "categories"."id" = 3  (0.7ms) commit transaction Redirected to http://127.0.0.1:53294/categories Completed 302 Found in 4ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:20:58 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]] SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (1.6ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-14 00:20:59 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 18ms (Views: 16.7ms | ActiveRecord: 0.3ms)  (1.0ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (1.3ms) commit transaction  (28.8ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (1.4ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:20:59 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:20:59 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL Rendered products/_form.html.erb (7.9ms) Completed 200 OK in 20ms (Views: 10.2ms | ActiveRecord: 0.6ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:20:59 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-14 00:21:01 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-14 00:21:01 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:01 UTC +00:00]]  (0.9ms) commit transaction Redirected to http://127.0.0.1:53294/products Completed 302 Found in 11ms (ActiveRecord: 2.7ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:01 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) SELECT "categories".id FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.4ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.4ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (0.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.2ms) 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.5ms) Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.4ms) Started POST "/products" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 8ms (ActiveRecord: 2.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.3ms) 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 7ms (Views: 5.2ms | ActiveRecord: 0.5ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.5ms) DELETE FROM "items";  (0.6ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.3ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Rendered products/_form.html.erb (9.0ms) Completed 200 OK in 13ms (Views: 11.1ms | ActiveRecord: 1.0ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.4ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.1ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 27ms (ActiveRecord: 2.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.3ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:02 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:21:02 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Rendered products/_form.html.erb (8.0ms) Completed 200 OK in 12ms (Views: 9.4ms | ActiveRecord: 0.8ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:21:03 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) 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 00:21:06 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:21:07 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.5ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]  (1.6ms) commit transaction Redirected to http://127.0.0.1:53294/products Completed 302 Found in 49ms (ActiveRecord: 3.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:21:07 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.4ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]  (2.2ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:07 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]  (1.2ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:08 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms)  (1.0ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:08 UTC +00:00]]  (0.9ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:21:08 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (76.6ms) Completed 200 OK in 81ms (Views: 80.7ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:21:10 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]  (24.6ms) commit transaction Redirected to http://127.0.0.1:53294/items Completed 302 Found in 28ms (ActiveRecord: 25.2ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.3ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (17.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (14.2ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (9.3ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:21:11 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (4.9ms) Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:21:11 UTC +00:00]]  (1.3ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 5ms (ActiveRecord: 1.9ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:11 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.5ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (2.1ms) DELETE FROM "items";  (20.7ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:21:12 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (7.5ms) Completed 200 OK in 12ms (Views: 10.3ms | ActiveRecord: 0.5ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:21:12 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:21:12.197596' WHERE "items"."id" = 1  (0.9ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 5ms (ActiveRecord: 1.4ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:12 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.2ms) Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (23.5ms) DELETE FROM "categories";  (7.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (25.4ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.3ms) DELETE FROM "product_has_categories";  (8.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (20.2ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:21:12 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:21:12 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (8.2ms) Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.5ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:21:13 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:21:14 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:21:14.802393' WHERE "items"."id" = 1  (0.8ms) commit transaction Redirected to http://127.0.0.1:53294/items Completed 302 Found in 4ms (ActiveRecord: 1.3ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:21:14 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms) Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.5ms) DELETE FROM "categories";  (4.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (2.2ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.3ms) DELETE FROM "items";  (1.6ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (5.2ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:16 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:16 UTC +00:00]]  (2.3ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:16 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:16 UTC +00:00]]  (1.3ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:16 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:16 UTC +00:00]]  (1.3ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:52:17 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (85.2ms) Rendered items/new.html.erb within layouts/application (89.7ms) Completed 200 OK in 153ms (Views: 146.8ms | ActiveRecord: 0.2ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:52:17 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00]]  (152.4ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 156ms (ActiveRecord: 152.9ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:17 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Rendered items/index.html.erb within layouts/application (1.3ms) Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (165.0ms) DELETE FROM "categories";  (105.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:52:17 UTC +00:00]]  (1.1ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:52:21 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (9.6ms) Completed 200 OK in 18ms (Views: 13.3ms | ActiveRecord: 1.7ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:52:21 +0200 Served asset /application.css - 200 OK (41ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:52:21 +0200 Served asset /application.js - 200 OK (29ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:52:22 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:52:23.072513' WHERE "items"."id" = 1  (1.0ms) commit transaction Redirected to http://127.0.0.1:54365/items Completed 302 Found in 7ms (ActiveRecord: 1.5ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) Item Load (0.3ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (105.0ms) DELETE FROM "categories";  (115.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (28.8ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.4ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.1ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.2ms)  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.6ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "item"], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (5.4ms) Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.3ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction  (0.2ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:52:23.603118' WHERE "items"."id" = 1  (0.9ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 4ms (ActiveRecord: 1.3ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:23 UTC +00:00]]  (0.9ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:52:23 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (5.5ms) Completed 200 OK in 7ms (Views: 7.1ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:52:24 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/items" for 127.0.0.1 at 2012-10-14 00:52:25 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00]]  (0.9ms) commit transaction Redirected to http://127.0.0.1:54365/items Completed 302 Found in 3ms (ActiveRecord: 1.4ms) Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:25 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items"  Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.2ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.2ms) DELETE FROM "categories";  (4.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (34.6ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (50.0ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00]]  (1.7ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:52:25 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.8ms) Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:52:25 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00]]  (0.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 3ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:25 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (30.8ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00], ["name", "category_1"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:25 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:52:25 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (4.6ms) Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-14 00:52:26 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:52:26 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.4ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:52:26.844819' WHERE "categories"."id" = 3  (0.8ms) commit transaction Redirected to http://127.0.0.1:54365/categories Completed 302 Found in 6ms (ActiveRecord: 1.4ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:26 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms) Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.7ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:26 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:26 UTC +00:00]]  (1.0ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:26 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.2ms)  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:52:27 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (3.7ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.3ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:52:27 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.0ms) begin transaction  (0.2ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:52:27.067993' WHERE "categories"."id" = 3  (0.9ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 3ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:27 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:27 UTC +00:00]]  (1.7ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:52:27 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (2.7ms) Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-14 00:52:27 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) 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 00:52:28 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (0.7ms) commit transaction Redirected to http://127.0.0.1:54365/categories Completed 302 Found in 3ms (ActiveRecord: 1.2ms) Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:28 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (0.9ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:52:28 +0200 Processing by ProductsController#new as HTML  (0.1ms) 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  (0.1ms) 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 (99.3ms) Completed 200 OK in 108ms (Views: 102.1ms | ActiveRecord: 0.6ms) Started POST "/products" for 127.0.0.1 at 2012-10-14 00:52:28 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (1.8ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 19ms (ActiveRecord: 2.9ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:28 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.1ms) 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: 4.0ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.7ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (1.2ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:28 UTC +00:00]]  (1.4ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:52:28 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.7ms) Completed 200 OK in 10ms (Views: 8.3ms | ActiveRecord: 0.8ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:52:29 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) 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 00:52:30 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.3ms) commit transaction Redirected to http://127.0.0.1:54365/products Completed 302 Found in 15ms (ActiveRecord: 2.6ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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.9ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.1ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "new one"], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.1ms) 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)  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.7ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "product"], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.2ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.0ms) Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.6ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 8ms (ActiveRecord: 2.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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.2ms | ActiveRecord: 0.2ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 22:52:31 UTC +00:00]]  (1.0ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:52:31 +0200 Processing by ProductsController#new as HTML  (0.3ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" IS NULL Rendered products/_form.html.erb (7.1ms) Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.4ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:52:32 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) 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 00:52:34 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-14 00:52:34 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 13 Oct 2012 22:52:34 UTC +00:00], ["name", "hello"], ["updated_at", Sat, 13 Oct 2012 22:52:34 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Sat, 13 Oct 2012 22:52:34 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:34 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Sat, 13 Oct 2012 22:52:34 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 22:52:34 UTC +00:00]]  (3.0ms) commit transaction Redirected to http://127.0.0.1:54365/products Completed 302 Found in 11ms (ActiveRecord: 4.4ms) Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:34 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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.2ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.2ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.9ms) 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]]  (1.2ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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_1"], ["parent_id", nil], ["updated_at", Sat, 13 Oct 2012 23:39:29 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (1.1ms) commit transaction Category Load (0.2ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) 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"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:39:30.085163' WHERE "categories"."id" = 3  (1.0ms) 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 Category Load (0.2ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (1.9ms) Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.0ms) 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"}  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.1ms) commit transaction 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 Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.7ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) 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]]  (1.1ms) commit transaction Category Load (0.1ms) 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"} Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') 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"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:39:34.424859' WHERE "categories"."id" = 3  (0.7ms) commit transaction 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 Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.3ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (2.6ms) DELETE FROM "products";  (0.8ms) DELETE FROM sqlite_sequence where name = 'products';  (1.5ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.5ms) DELETE FROM "items";  (1.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (65.0ms) commit transaction 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"} Category Load (0.2ms) 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"}  (0.1ms) begin transaction SQL (0.5ms) 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]]  (0.9ms) commit transaction 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 Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (0.8ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:39:36 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.2ms)  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) 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]]  (0.9ms) commit transaction Category Load (0.2ms) 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"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 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"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction  (0.2ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 23:39:36.338070' WHERE "items"."id" = 1  (1.8ms) commit transaction 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 Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms) Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (0.8ms) commit transaction 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"}  (0.1ms) begin transaction SQL (0.6ms) 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", "hello"], ["updated_at", Sat, 13 Oct 2012 23:39:36 UTC +00:00]]  (1.8ms) 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 Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms) Item Load (0.1ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (0.8ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (1.0ms) commit transaction Category Load (0.1ms) 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"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.1ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') 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"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 23:39:37.953972' WHERE "items"."id" = 1  (1.0ms) commit transaction 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 Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.3ms) commit transaction 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"} Category Load (0.2ms) 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"}  (0.1ms) begin transaction SQL (0.5ms) 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]]  (0.9ms) commit transaction 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 Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.4ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.7ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (0.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) 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]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) 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]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) 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", "new one"], ["updated_at", Sat, 13 Oct 2012 23:39:39 UTC +00:00]]  (0.9ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 01:39:39 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (1.0ms) DELETE FROM "categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.2ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (1.0ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["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]] SQL (0.3ms) 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]] SQL (0.1ms) 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]]  (1.6ms) 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"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.2ms) 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]]  (1.6ms) commit transaction 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 Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 6ms (Views: 4.5ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.3ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.6ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (1.1ms) 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  (0.2ms) 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  (0.1ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["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]] SQL (0.1ms) 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]] SQL (0.1ms) 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]]  (1.2ms) 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 Product Load (0.2ms) SELECT "products".* FROM "products"   (0.1ms) 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) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.1ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (1.1ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.3ms) 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]] SQL (0.2ms) 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:40 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:40 UTC +00:00]] SQL (0.1ms) 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]]  (1.2ms) commit transaction 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"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (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"} Category Load (0.2ms) 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"} Category Load (0.1ms) 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:39:42 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.6ms) 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:42 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:42 UTC +00:00]]  (1.1ms) 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 Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.3ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.5ms) DELETE FROM "products";  (1.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.4ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.8ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-14 01:39:42 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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.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"} Category Load (0.2ms) 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"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) 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]] SQL (0.3ms) 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]] SQL (0.4ms) 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]]  (1.1ms) commit transaction 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 Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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.6ms | ActiveRecord: 0.2ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.5ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) 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]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.1ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["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]] SQL (0.2ms) 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]] SQL (0.1ms) 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:45 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:39:45 UTC +00:00]]  (1.8ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-14 01:39:45 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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)  (1.0ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (4.6ms) 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]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.0ms) commit transaction Category Load (0.2ms) 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"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') 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"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:47:11.535973' WHERE "categories"."id" = 3  (0.5ms) commit transaction 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 Category Load (0.2ms) 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) Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (55.5ms) DELETE FROM "categories";  (2.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.8ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.1ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-14 01:47:11 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (1.3ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.5ms) commit transaction 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"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.4ms) 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 Category Load (0.1ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.1ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.3ms) DELETE FROM "items";  (0.3ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.8ms) 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"} Category Load (0.2ms) 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:47:13 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.0ms) 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 Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.5ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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_3"], ["parent_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:13 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.1ms) 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:13 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 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"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.0ms) begin transaction  (0.2ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 23:47:13.590811' WHERE "categories"."id" = 3  (1.1ms) commit transaction 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 Category Load (0.1ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.8ms) DELETE FROM "product_has_categories";  (0.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.7ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.3ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.0ms) commit transaction Category Load (0.2ms) 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:13 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 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"} Category Load (0.1ms) 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"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 23:47:15.138499' WHERE "items"."id" = 1  (0.9ms) 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 Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms) Item Load (0.3ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.2ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.6ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.2ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) 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]]  (1.9ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-14 01:47:15 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)  (1.2ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (31.2ms) 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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.8ms) 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 (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"}  (0.1ms) begin transaction SQL (0.4ms) 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", "hello"], ["updated_at", Sat, 13 Oct 2012 23:47:15 UTC +00:00]]  (1.5ms) 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 Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.7ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) 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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) 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]]  (0.8ms) 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"} Category Load (0.2ms) 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:47:16 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.5ms) 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", "hello"], ["updated_at", Sat, 13 Oct 2012 23:47:16 UTC +00:00]]  (1.0ms) 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 Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.1ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) 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]]  (0.9ms) commit transaction Category Load (0.1ms) 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"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.1ms) 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"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 23:47:17.010915' WHERE "items"."id" = 1  (1.1ms) 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 Item Load (0.2ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms) Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.2ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.7ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) 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]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["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]] SQL (0.3ms) 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]] SQL (0.1ms) 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:17 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:17 UTC +00:00]]  (1.6ms) 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"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') 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"} Category Load (0.1ms) 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"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.4ms) 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]]  (1.1ms) commit transaction 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 Product Load (0.1ms) SELECT "products".* FROM "products"  (0.2ms) 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: 4.1ms | ActiveRecord: 0.3ms) Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.6ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) 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]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["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]] SQL (0.1ms) 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]] SQL (0.1ms) 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:20 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-14 01:47:20 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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)  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.0ms) 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  (0.1ms) 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  (0.1ms) 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.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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.3ms) 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]] SQL (0.2ms) 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:20 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:20 UTC +00:00]] SQL (0.2ms) 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]]  (1.0ms) commit transaction 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 Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.5ms | ActiveRecord: 0.3ms) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.3ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) 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]]  (1.6ms) 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  (0.2ms) 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  (0.1ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') 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"} Category Load (0.1ms) 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"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["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]] SQL (0.3ms) 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]] SQL (0.2ms) 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]]  (2.5ms) 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 Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.5ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) 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]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["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]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) 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]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) 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]] SQL (0.1ms) 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]] SQL (0.1ms) 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]]  (1.2ms) commit transaction 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"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (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"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.2ms) 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:23 UTC +00:00], ["product_id", 1], ["updated_at", Sat, 13 Oct 2012 23:47:23 UTC +00:00]]  (1.6ms) 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 Product Load (0.1ms) SELECT "products".* FROM "products"   (0.1ms) 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) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.1ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items'; Connecting to database specified by database.yml  (0.1ms) begin transaction SQL (38.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00], ["name", "category_1"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00], ["name", "category_2"], ["parent_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-24 16:49:19 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (143.2ms) Rendered categories/edit.html.erb within layouts/application (159.9ms) Completed 200 OK in 202ms (Views: 200.3ms | ActiveRecord: 0.4ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-24 16:49:19 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_2", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-24 14:49:19.576089' WHERE "categories"."id" = 3  (0.8ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 6ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-24 16:49:19 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Rendered categories/index.html.erb within layouts/application (2.0ms) Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (67.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (11.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.2ms) DELETE FROM "items";  (0.3ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:19 UTC +00:00]]  (1.2ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-24 16:49:27 +0200 Processing by CategoriesController#edit as HTML Parameters: {"id"=>"3"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered categories/_form.html.erb (9.0ms) Completed 200 OK in 16ms (Views: 12.6ms | ActiveRecord: 0.9ms) Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-24 16:49:27 +0200 Served asset /application.css - 200 OK (42ms) Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-24 16:49:27 +0200 Served asset /application.js - 200 OK (15ms) Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-24 16:49:28 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"new parent"} Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%') Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.4ms) Started PUT "/categories/3" for 127.0.0.1 at 2012-10-24 16:49:29 +0200 Processing by CategoriesController#update as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]  (0.1ms) begin transaction  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-24 14:49:29.265141' WHERE "categories"."id" = 3  (0.9ms) commit transaction Redirected to http://127.0.0.1:51454/categories Completed 302 Found in 5ms (ActiveRecord: 1.3ms) Started GET "/categories" for 127.0.0.1 at 2012-10-24 16:49:29 +0200 Processing by CategoriesController#index as HTML Category Load (0.3ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 5ms (Views: 2.9ms | ActiveRecord: 0.3ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (113.9ms) DELETE FROM "categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.3ms) DELETE FROM "products";  (128.3ms) DELETE FROM sqlite_sequence where name = 'products';  (4.6ms) DELETE FROM "product_has_categories";  (1.6ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (2.6ms) DELETE FROM "items";  (0.8ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:29 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:29 UTC +00:00]]  (167.3ms) commit transaction Started GET "/categories" for 127.0.0.1 at 2012-10-24 16:49:29 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.2ms)  (1.9ms) DELETE FROM "categories";  (9.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (12.7ms) DELETE FROM "products";  (9.1ms) DELETE FROM sqlite_sequence where name = 'products';  (60.1ms) DELETE FROM "product_has_categories";  (0.7ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (92.2ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:30 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:30 UTC +00:00]]  (0.9ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-24 16:49:30 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (4.1ms) Completed 200 OK in 36ms (Views: 35.1ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-24 16:49:30 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"wood"} Category Load (0.2ms) 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-24 16:49:31 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (3.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (3.9ms) commit transaction Redirected to http://127.0.0.1:51454/categories Completed 302 Found in 11ms (ActiveRecord: 7.6ms) Started GET "/categories" for 127.0.0.1 at 2012-10-24 16:49:31 +0200 Processing by CategoriesController#index as HTML Category Load (0.1ms) SELECT "categories".* FROM "categories"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.1ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (1.2ms) commit transaction Started GET "/categories/new" for 127.0.0.1 at 2012-10-24 16:49:31 +0200 Processing by CategoriesController#new as HTML Rendered categories/_form.html.erb (2.7ms) Completed 200 OK in 4ms (Views: 4.1ms | ActiveRecord: 0.0ms) Started POST "/categories" for 127.0.0.1 at 2012-10-24 16:49:31 +0200 Processing by CategoriesController#create as HTML Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (1.0ms) commit transaction Redirected to http://www.example.com/categories Completed 302 Found in 5ms (ActiveRecord: 1.7ms) Started GET "/categories" for 127.0.0.1 at 2012-10-24 16:49:31 +0200 Processing by CategoriesController#index as HTML Category Load (0.2ms) SELECT "categories".* FROM "categories" Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms) Category Load (0.1ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (1.2ms) DELETE FROM "categories";  (1.6ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (2.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00], ["name", "item"], ["updated_at", Wed, 24 Oct 2012 14:49:31 UTC +00:00]]  (1.2ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-24 16:49:31 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (81.0ms) Completed 200 OK in 134ms (Views: 131.9ms | ActiveRecord: 0.4ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-24 16:49:32 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.0ms) begin transaction  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-24 14:49:32.038199' WHERE "items"."id" = 1  (1.6ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 5ms (ActiveRecord: 2.1ms) Started GET "/items" for 127.0.0.1 at 2012-10-24 16:49:32 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 44ms (Views: 42.7ms | ActiveRecord: 0.2ms) Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (1.0ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.3ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00], ["name", "item"], ["updated_at", Wed, 24 Oct 2012 14:49:32 UTC +00:00]]  (1.3ms) commit transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-24 16:49:32 +0200 Processing by ItemsController#edit as HTML Parameters: {"id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1 Rendered items/_form.html.erb (7.5ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.7ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-24 16:49:32 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms) Started PUT "/items/1" for 127.0.0.1 at 2012-10-24 16:49:33 +0200 Processing by ItemsController#update as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"} Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction  (2.6ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-24 14:49:33.550999' WHERE "items"."id" = 1  (3.8ms) commit transaction Redirected to http://127.0.0.1:51454/items Completed 302 Found in 10ms (ActiveRecord: 6.5ms) Started GET "/items" for 127.0.0.1 at 2012-10-24 16:49:33 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1  (0.9ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.7ms) DELETE FROM "items";  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "new one"], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items" for 127.0.0.1 at 2012-10-24 16:49:33 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items" Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (1.3ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.1ms) DELETE FROM "products";  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:33 UTC +00:00]]  (1.0ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-24 16:49:33 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (7.0ms) Completed 200 OK in 62ms (Views: 61.7ms | ActiveRecord: 0.0ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-24 16:49:34 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) 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-24 16:49:35 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "hello"], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (250.7ms) commit transaction Redirected to http://127.0.0.1:51454/items Completed 302 Found in 254ms (ActiveRecord: 251.3ms) Started GET "/items" for 127.0.0.1 at 2012-10-24 16:49:35 +0200 Processing by ItemsController#index as HTML Item Load (0.2ms) SELECT "items".* FROM "items" Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.2ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.4ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.4ms) DELETE FROM "items";  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (0.8ms) commit transaction Started GET "/items/new" for 127.0.0.1 at 2012-10-24 16:49:35 +0200 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (4.4ms) Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.0ms) Started POST "/items" for 127.0.0.1 at 2012-10-24 16:49:35 +0200 Processing by ItemsController#create as HTML Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "hello"], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (0.9ms) commit transaction Redirected to http://www.example.com/items Completed 302 Found in 3ms (ActiveRecord: 1.4ms) Started GET "/items" for 127.0.0.1 at 2012-10-24 16:49:35 +0200 Processing by ItemsController#index as HTML Item Load (0.1ms) SELECT "items".* FROM "items"  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms) Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  (0.9ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:35 UTC +00:00]]  (0.9ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["name", "product"], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]]  (1.3ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-24 16:49:36 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.2ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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.5ms) Completed 200 OK in 55ms (Views: 52.7ms | ActiveRecord: 0.6ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-24 16:49:36 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]]  (1.2ms) commit transaction Redirected to http://www.example.com/products Completed 302 Found in 11ms (ActiveRecord: 2.2ms) Started GET "/products" for 127.0.0.1 at 2012-10-24 16:49:36 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"  (0.2ms) 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 33ms (Views: 31.8ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.2ms) DELETE FROM "categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.8ms) DELETE FROM "items";  (0.3ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]]  (1.9ms) commit transaction Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["name", "product"], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:36 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-24 16:49:36 +0200 Processing by ProductsController#edit as HTML Parameters: {"id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 Category Load (0.1ms) 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 (6.5ms) Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 0.8ms) Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-24 16:49:36 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"skirt"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%') 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-24 16:49:38 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started PUT "/products/1" for 127.0.0.1 at 2012-10-24 16:49:38 +0200 Processing by ProductsController#update as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"} Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]  (0.1ms) begin transaction Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1) Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1 SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3 SQL (0.5ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Wed, 24 Oct 2012 14:49:38 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:38 UTC +00:00]]  (8.0ms) commit transaction Redirected to http://127.0.0.1:51454/products Completed 302 Found in 15ms (ActiveRecord: 9.1ms) Started GET "/products" for 127.0.0.1 at 2012-10-24 16:49:39 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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: 3.0ms | ActiveRecord: 0.3ms) Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]] Category Load (0.2ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.0ms) DELETE FROM "categories";  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.9ms) DELETE FROM "products";  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';  (1.0ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.1ms) DELETE FROM "items";  (0.6ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (0.8ms) commit transaction Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "new one"], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]] SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (1.1ms) commit transaction Started GET "/products" for 127.0.0.1 at 2012-10-24 16:49:39 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (1.1ms) DELETE FROM "categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.2ms) DELETE FROM "products";  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';  (0.9ms) DELETE FROM "product_has_categories";  (0.9ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:39 UTC +00:00]]  (1.5ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-24 16:49:39 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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 (5.2ms) Completed 200 OK in 36ms (Views: 35.6ms | ActiveRecord: 0.3ms) Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-24 16:49:40 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"shoes"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%') Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms) Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-24 16:49:41 +0200 Processing by CategoriesController#token as JSON Parameters: {"q"=>"pents"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%') Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms) Started POST "/products" for 127.0.0.1 at 2012-10-24 16:49:42 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["name", "hello"], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]] SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]]  (7.2ms) commit transaction Redirected to http://127.0.0.1:51454/products Completed 302 Found in 16ms (ActiveRecord: 8.6ms) Started GET "/products" for 127.0.0.1 at 2012-10-24 16:49:42 +0200 Processing by ProductsController#index as HTML Product Load (0.1ms) SELECT "products".* FROM "products"  (0.1ms) 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) Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.3ms) DELETE FROM "categories";  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';  (1.0ms) DELETE FROM "products";  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (0.9ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]]  (1.2ms) commit transaction Started GET "/products/new" for 127.0.0.1 at 2012-10-24 16:49:42 +0200 Processing by ProductsController#new as HTML  (0.2ms) 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  (0.1ms) 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.7ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.3ms) Started POST "/products" for 127.0.0.1 at 2012-10-24 16:49:42 +0200 Processing by ProductsController#create as HTML Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"} Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)  (0.0ms) begin transaction SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["name", "hello"], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]] SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00], ["product_id", 1], ["updated_at", Wed, 24 Oct 2012 14:49:42 UTC +00:00]]  (1.2ms) 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-24 16:49:42 +0200 Processing by ProductsController#index as HTML Product Load (0.2ms) SELECT "products".* FROM "products"   (0.2ms) 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.8ms | ActiveRecord: 0.4ms) Product Load (0.1ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1 Category Load (0.1ms) SELECT "categories".* FROM "categories" INNER JOIN "product_has_categories" ON "categories"."id" = "product_has_categories"."category_id" WHERE "product_has_categories"."product_id" = 1  (1.3ms) DELETE FROM "categories";  (0.8ms) DELETE FROM sqlite_sequence where name = 'categories';  (0.8ms) DELETE FROM "products";  (1.3ms) DELETE FROM sqlite_sequence where name = 'products';  (1.2ms) DELETE FROM "product_has_categories";  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';  (1.0ms) DELETE FROM "items";  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';