token_field 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,5 +11,9 @@ module TokenField
11
11
  initializer "token_input" do
12
12
  require "token_field/simple_form/token_input" if defined?(SimpleForm)
13
13
  end
14
+
15
+ initializer "token_field_test_helper" do
16
+ require "token_field/capybara/dsl" if Rails.env.test?
17
+ end
14
18
  end
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module TokenField
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/token_field.rb CHANGED
@@ -1,3 +1,2 @@
1
1
  require "token_field/form_builder"
2
2
  require "token_field/engine"
3
- require "token_field/capybara/dsl" if Rails.env.test?
Binary file
@@ -7449,3 +7449,693 @@ Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)
7449
7449
   (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7450
7450
   (1.3ms) DELETE FROM "items";
7451
7451
   (1.6ms) DELETE FROM sqlite_sequence where name = 'items';
7452
+ Connecting to database specified by database.yml
7453
+  (0.1ms) begin transaction
7454
+ 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]]
7455
+  (2.3ms) commit transaction
7456
+  (0.0ms) begin transaction
7457
+ 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]]
7458
+  (1.3ms) commit transaction
7459
+  (0.0ms) begin transaction
7460
+ 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]]
7461
+  (1.3ms) commit transaction
7462
+
7463
+
7464
+ Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:52:17 +0200
7465
+ Processing by ItemsController#new as HTML
7466
+ Rendered items/_form.html.erb (85.2ms)
7467
+ Rendered items/new.html.erb within layouts/application (89.7ms)
7468
+ Completed 200 OK in 153ms (Views: 146.8ms | ActiveRecord: 0.2ms)
7469
+
7470
+
7471
+ Started POST "/items" for 127.0.0.1 at 2012-10-14 00:52:17 +0200
7472
+ Processing by ItemsController#create as HTML
7473
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
7474
+  (0.1ms) begin transaction
7475
+ 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]]
7476
+  (152.4ms) commit transaction
7477
+ Redirected to http://www.example.com/items
7478
+ Completed 302 Found in 156ms (ActiveRecord: 152.9ms)
7479
+
7480
+
7481
+ Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:17 +0200
7482
+ Processing by ItemsController#index as HTML
7483
+ Item Load (0.1ms) SELECT "items".* FROM "items" 
7484
+ Rendered items/index.html.erb within layouts/application (1.3ms)
7485
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms)
7486
+ Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
7487
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7488
+  (165.0ms) DELETE FROM "categories";
7489
+  (105.9ms) DELETE FROM sqlite_sequence where name = 'categories';
7490
+  (0.9ms) DELETE FROM "products";
7491
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';
7492
+  (0.9ms) DELETE FROM "product_has_categories";
7493
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7494
+  (0.9ms) DELETE FROM "items";
7495
+  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';
7496
+  (0.1ms) begin transaction
7497
+ 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]]
7498
+  (1.0ms) commit transaction
7499
+  (0.0ms) begin transaction
7500
+ 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]]
7501
+  (0.9ms) commit transaction
7502
+  (0.0ms) begin transaction
7503
+ 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]]
7504
+  (0.9ms) commit transaction
7505
+  (0.0ms) begin transaction
7506
+ 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]]
7507
+  (1.1ms) commit transaction
7508
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7509
+
7510
+
7511
+ Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:52:21 +0200
7512
+ Processing by ItemsController#edit as HTML
7513
+ Parameters: {"id"=>"1"}
7514
+ Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
7515
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7516
+ Rendered items/_form.html.erb (9.6ms)
7517
+ Completed 200 OK in 18ms (Views: 13.3ms | ActiveRecord: 1.7ms)
7518
+
7519
+
7520
+ Started GET "/assets/application.css" for 127.0.0.1 at 2012-10-14 00:52:21 +0200
7521
+ Served asset /application.css - 200 OK (41ms)
7522
+
7523
+
7524
+ Started GET "/assets/application.js" for 127.0.0.1 at 2012-10-14 00:52:21 +0200
7525
+ Served asset /application.js - 200 OK (29ms)
7526
+
7527
+
7528
+ Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:52:22 +0200
7529
+ Processing by CategoriesController#token as JSON
7530
+ Parameters: {"q"=>"skirt"}
7531
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')
7532
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
7533
+
7534
+
7535
+ Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7536
+ Processing by ItemsController#update as HTML
7537
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
7538
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
7539
+  (0.1ms) begin transaction
7540
+  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:52:23.072513' WHERE "items"."id" = 1
7541
+  (1.0ms) commit transaction
7542
+ Redirected to http://127.0.0.1:54365/items
7543
+ Completed 302 Found in 7ms (ActiveRecord: 1.5ms)
7544
+
7545
+
7546
+ Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7547
+ Processing by ItemsController#index as HTML
7548
+ Item Load (0.1ms) SELECT "items".* FROM "items"
7549
+ Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)
7550
+ Item Load (0.3ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
7551
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
7552
+  (105.0ms) DELETE FROM "categories";
7553
+  (115.9ms) DELETE FROM sqlite_sequence where name = 'categories';
7554
+  (1.1ms) DELETE FROM "products";
7555
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';
7556
+  (28.8ms) DELETE FROM "product_has_categories";
7557
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7558
+  (1.0ms) DELETE FROM "items";
7559
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';
7560
+  (0.1ms) begin transaction
7561
+ 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]]
7562
+  (1.7ms) commit transaction
7563
+  (0.1ms) begin transaction
7564
+ 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]]
7565
+  (1.4ms) commit transaction
7566
+  (0.0ms) begin transaction
7567
+ 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]]
7568
+  (1.0ms) commit transaction
7569
+  (0.0ms) begin transaction
7570
+ 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]]
7571
+  (1.1ms) commit transaction
7572
+
7573
+
7574
+ Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7575
+ Processing by ItemsController#index as HTML
7576
+ Item Load (0.2ms) SELECT "items".* FROM "items" 
7577
+ Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.2ms)
7578
+  (1.0ms) DELETE FROM "categories";
7579
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';
7580
+  (1.6ms) DELETE FROM "products";
7581
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';
7582
+  (1.0ms) DELETE FROM "product_has_categories";
7583
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7584
+  (0.9ms) DELETE FROM "items";
7585
+  (0.9ms) DELETE FROM sqlite_sequence where name = 'items';
7586
+  (0.1ms) begin transaction
7587
+ 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]]
7588
+  (1.7ms) commit transaction
7589
+  (0.1ms) begin transaction
7590
+ 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]]
7591
+  (0.9ms) commit transaction
7592
+  (0.1ms) begin transaction
7593
+ 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]]
7594
+  (1.0ms) commit transaction
7595
+  (0.0ms) begin transaction
7596
+ 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]]
7597
+  (1.0ms) commit transaction
7598
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7599
+
7600
+
7601
+ Started GET "/items/1/edit" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7602
+ Processing by ItemsController#edit as HTML
7603
+ Parameters: {"id"=>"1"}
7604
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
7605
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7606
+ Rendered items/_form.html.erb (5.4ms)
7607
+ Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.3ms)
7608
+
7609
+
7610
+ Started PUT "/items/1" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7611
+ Processing by ItemsController#update as HTML
7612
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
7613
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
7614
+  (0.0ms) begin transaction
7615
+  (0.2ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2012-10-13 22:52:23.603118' WHERE "items"."id" = 1
7616
+  (0.9ms) commit transaction
7617
+ Redirected to http://www.example.com/items
7618
+ Completed 302 Found in 4ms (ActiveRecord: 1.3ms)
7619
+
7620
+
7621
+ Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7622
+ Processing by ItemsController#index as HTML
7623
+ Item Load (0.1ms) SELECT "items".* FROM "items" 
7624
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
7625
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
7626
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
7627
+  (0.9ms) DELETE FROM "categories";
7628
+  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';
7629
+  (1.0ms) DELETE FROM "products";
7630
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';
7631
+  (0.9ms) DELETE FROM "product_has_categories";
7632
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7633
+  (1.1ms) DELETE FROM "items";
7634
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';
7635
+  (0.1ms) begin transaction
7636
+ 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]]
7637
+  (1.7ms) commit transaction
7638
+  (0.1ms) begin transaction
7639
+ 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]]
7640
+  (1.0ms) commit transaction
7641
+  (0.0ms) begin transaction
7642
+ 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]]
7643
+  (0.9ms) commit transaction
7644
+
7645
+
7646
+ Started GET "/items/new" for 127.0.0.1 at 2012-10-14 00:52:23 +0200
7647
+ Processing by ItemsController#new as HTML
7648
+ Rendered items/_form.html.erb (5.5ms)
7649
+ Completed 200 OK in 7ms (Views: 7.1ms | ActiveRecord: 0.0ms)
7650
+
7651
+
7652
+ Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:52:24 +0200
7653
+ Processing by CategoriesController#token as JSON
7654
+ Parameters: {"q"=>"shoes"}
7655
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
7656
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
7657
+
7658
+
7659
+ Started POST "/items" for 127.0.0.1 at 2012-10-14 00:52:25 +0200
7660
+ Processing by ItemsController#create as HTML
7661
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
7662
+  (0.1ms) begin transaction
7663
+ 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]]
7664
+  (0.9ms) commit transaction
7665
+ Redirected to http://127.0.0.1:54365/items
7666
+ Completed 302 Found in 3ms (ActiveRecord: 1.4ms)
7667
+
7668
+
7669
+ Started GET "/items" for 127.0.0.1 at 2012-10-14 00:52:25 +0200
7670
+ Processing by ItemsController#index as HTML
7671
+ Item Load (0.2ms) SELECT "items".* FROM "items" 
7672
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.2ms)
7673
+ Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
7674
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7675
+  (1.2ms) DELETE FROM "categories";
7676
+  (4.3ms) DELETE FROM sqlite_sequence where name = 'categories';
7677
+  (34.6ms) DELETE FROM "products";
7678
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';
7679
+  (0.9ms) DELETE FROM "product_has_categories";
7680
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7681
+  (50.0ms) DELETE FROM "items";
7682
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';
7683
+  (0.1ms) begin transaction
7684
+ 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]]
7685
+  (1.7ms) commit transaction
7686
+
7687
+
7688
+ Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:52:25 +0200
7689
+ Processing by CategoriesController#new as HTML
7690
+ Rendered categories/_form.html.erb (4.8ms)
7691
+ Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.0ms)
7692
+
7693
+
7694
+ Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:52:25 +0200
7695
+ Processing by CategoriesController#create as HTML
7696
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}
7697
+  (0.1ms) begin transaction
7698
+ 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]]
7699
+  (0.8ms) commit transaction
7700
+ Redirected to http://www.example.com/categories
7701
+ Completed 302 Found in 3ms (ActiveRecord: 1.3ms)
7702
+
7703
+
7704
+ Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:25 +0200
7705
+ Processing by CategoriesController#index as HTML
7706
+ Category Load (0.2ms) SELECT "categories".* FROM "categories"
7707
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms)
7708
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1
7709
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7710
+  (1.1ms) DELETE FROM "categories";
7711
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';
7712
+  (0.8ms) DELETE FROM "products";
7713
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';
7714
+  (0.9ms) DELETE FROM "product_has_categories";
7715
+  (0.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7716
+  (0.9ms) DELETE FROM "items";
7717
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
7718
+  (0.1ms) begin transaction
7719
+ 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]]
7720
+  (1.6ms) commit transaction
7721
+  (0.1ms) begin transaction
7722
+ 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]]
7723
+  (1.1ms) commit transaction
7724
+  (0.1ms) begin transaction
7725
+ 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]]
7726
+  (1.0ms) commit transaction
7727
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7728
+
7729
+
7730
+ Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:52:25 +0200
7731
+ Processing by CategoriesController#edit as HTML
7732
+ Parameters: {"id"=>"3"}
7733
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
7734
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7735
+ Rendered categories/_form.html.erb (4.6ms)
7736
+ Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.4ms)
7737
+
7738
+
7739
+ Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2012-10-14 00:52:26 +0200
7740
+ Processing by CategoriesController#token as JSON
7741
+ Parameters: {"q"=>"new parent"}
7742
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%')
7743
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
7744
+
7745
+
7746
+ Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:52:26 +0200
7747
+ Processing by CategoriesController#update as HTML
7748
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"}
7749
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
7750
+  (0.1ms) begin transaction
7751
+  (0.4ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:52:26.844819' WHERE "categories"."id" = 3
7752
+  (0.8ms) commit transaction
7753
+ Redirected to http://127.0.0.1:54365/categories
7754
+ Completed 302 Found in 6ms (ActiveRecord: 1.4ms)
7755
+
7756
+
7757
+ Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:26 +0200
7758
+ Processing by CategoriesController#index as HTML
7759
+ Category Load (0.1ms) SELECT "categories".* FROM "categories"
7760
+ Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)
7761
+ Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]]
7762
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
7763
+  (1.1ms) DELETE FROM "categories";
7764
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
7765
+  (0.9ms) DELETE FROM "products";
7766
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';
7767
+  (1.0ms) DELETE FROM "product_has_categories";
7768
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7769
+  (1.0ms) DELETE FROM "items";
7770
+  (0.7ms) DELETE FROM sqlite_sequence where name = 'items';
7771
+  (0.1ms) begin transaction
7772
+ 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]]
7773
+  (1.0ms) commit transaction
7774
+
7775
+
7776
+ Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:26 +0200
7777
+ Processing by CategoriesController#index as HTML
7778
+ Category Load (0.2ms) SELECT "categories".* FROM "categories"
7779
+ Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.2ms)
7780
+  (1.1ms) DELETE FROM "categories";
7781
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';
7782
+  (0.9ms) DELETE FROM "products";
7783
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'products';
7784
+  (1.0ms) DELETE FROM "product_has_categories";
7785
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7786
+  (0.8ms) DELETE FROM "items";
7787
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
7788
+  (0.1ms) begin transaction
7789
+ 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]]
7790
+  (1.1ms) commit transaction
7791
+  (0.1ms) begin transaction
7792
+ 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]]
7793
+  (0.9ms) commit transaction
7794
+  (0.0ms) begin transaction
7795
+ 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]]
7796
+  (0.9ms) commit transaction
7797
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7798
+
7799
+
7800
+ Started GET "/categories/3/edit" for 127.0.0.1 at 2012-10-14 00:52:27 +0200
7801
+ Processing by CategoriesController#edit as HTML
7802
+ Parameters: {"id"=>"3"}
7803
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
7804
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7805
+ Rendered categories/_form.html.erb (3.7ms)
7806
+ Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.3ms)
7807
+
7808
+
7809
+ Started PUT "/categories/3" for 127.0.0.1 at 2012-10-14 00:52:27 +0200
7810
+ Processing by CategoriesController#update as HTML
7811
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"}
7812
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
7813
+  (0.0ms) begin transaction
7814
+  (0.2ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2012-10-13 22:52:27.067993' WHERE "categories"."id" = 3
7815
+  (0.9ms) commit transaction
7816
+ Redirected to http://www.example.com/categories
7817
+ Completed 302 Found in 3ms (ActiveRecord: 1.3ms)
7818
+
7819
+
7820
+ Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:27 +0200
7821
+ Processing by CategoriesController#index as HTML
7822
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" 
7823
+ Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)
7824
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]]
7825
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
7826
+  (1.1ms) DELETE FROM "categories";
7827
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';
7828
+  (0.9ms) DELETE FROM "products";
7829
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'products';
7830
+  (0.9ms) DELETE FROM "product_has_categories";
7831
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7832
+  (0.9ms) DELETE FROM "items";
7833
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';
7834
+  (0.1ms) begin transaction
7835
+ 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]]
7836
+  (1.7ms) commit transaction
7837
+
7838
+
7839
+ Started GET "/categories/new" for 127.0.0.1 at 2012-10-14 00:52:27 +0200
7840
+ Processing by CategoriesController#new as HTML
7841
+ Rendered categories/_form.html.erb (2.7ms)
7842
+ Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
7843
+
7844
+
7845
+ Started GET "/categories/token?q=wood" for 127.0.0.1 at 2012-10-14 00:52:27 +0200
7846
+ Processing by CategoriesController#token as JSON
7847
+ Parameters: {"q"=>"wood"}
7848
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%')
7849
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
7850
+
7851
+
7852
+ Started POST "/categories" for 127.0.0.1 at 2012-10-14 00:52:28 +0200
7853
+ Processing by CategoriesController#create as HTML
7854
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}
7855
+  (0.1ms) begin transaction
7856
+ 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]]
7857
+  (0.7ms) commit transaction
7858
+ Redirected to http://127.0.0.1:54365/categories
7859
+ Completed 302 Found in 3ms (ActiveRecord: 1.2ms)
7860
+
7861
+
7862
+ Started GET "/categories" for 127.0.0.1 at 2012-10-14 00:52:28 +0200
7863
+ Processing by CategoriesController#index as HTML
7864
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" 
7865
+ Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.2ms)
7866
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1
7867
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
7868
+  (1.0ms) DELETE FROM "categories";
7869
+  (0.8ms) DELETE FROM sqlite_sequence where name = 'categories';
7870
+  (0.9ms) DELETE FROM "products";
7871
+  (0.3ms) DELETE FROM sqlite_sequence where name = 'products';
7872
+  (1.0ms) DELETE FROM "product_has_categories";
7873
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7874
+  (0.9ms) DELETE FROM "items";
7875
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
7876
+  (0.1ms) begin transaction
7877
+ 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]]
7878
+  (0.9ms) commit transaction
7879
+  (0.1ms) begin transaction
7880
+ 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]]
7881
+  (1.0ms) commit transaction
7882
+  (0.0ms) begin transaction
7883
+ 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]]
7884
+  (0.9ms) commit transaction
7885
+
7886
+
7887
+ Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:52:28 +0200
7888
+ Processing by ProductsController#new as HTML
7889
+  (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
7890
+  (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
7891
+ Rendered products/_form.html.erb (99.3ms)
7892
+ Completed 200 OK in 108ms (Views: 102.1ms | ActiveRecord: 0.6ms)
7893
+
7894
+
7895
+ Started POST "/products" for 127.0.0.1 at 2012-10-14 00:52:28 +0200
7896
+ Processing by ProductsController#create as HTML
7897
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"}
7898
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)
7899
+  (0.0ms) begin transaction
7900
+ 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]]
7901
+ 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]]
7902
+ 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]]
7903
+  (1.8ms) commit transaction
7904
+ Redirected to http://www.example.com/products
7905
+ Completed 302 Found in 19ms (ActiveRecord: 2.9ms)
7906
+
7907
+
7908
+ Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:28 +0200
7909
+ Processing by ProductsController#index as HTML
7910
+ Product Load (0.2ms) SELECT "products".* FROM "products" 
7911
+  (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
7912
+ Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.3ms)
7913
+ Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1
7914
+ 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
7915
+  (0.9ms) DELETE FROM "categories";
7916
+  (1.7ms) DELETE FROM sqlite_sequence where name = 'categories';
7917
+  (1.0ms) DELETE FROM "products";
7918
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';
7919
+  (1.0ms) DELETE FROM "product_has_categories";
7920
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7921
+  (0.9ms) DELETE FROM "items";
7922
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
7923
+  (0.1ms) begin transaction
7924
+ 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]]
7925
+  (1.0ms) commit transaction
7926
+  (0.1ms) begin transaction
7927
+ 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]]
7928
+  (1.2ms) commit transaction
7929
+  (0.0ms) begin transaction
7930
+ 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]]
7931
+  (1.0ms) commit transaction
7932
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
7933
+  (0.1ms) begin transaction
7934
+ 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]]
7935
+ 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]]
7936
+ 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]]
7937
+  (1.4ms) commit transaction
7938
+
7939
+
7940
+ Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:52:28 +0200
7941
+ Processing by ProductsController#edit as HTML
7942
+ Parameters: {"id"=>"1"}
7943
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
7944
+  (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
7945
+  (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
7946
+ 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
7947
+ Rendered products/_form.html.erb (6.7ms)
7948
+ Completed 200 OK in 10ms (Views: 8.3ms | ActiveRecord: 0.8ms)
7949
+
7950
+
7951
+ Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2012-10-14 00:52:29 +0200
7952
+ Processing by CategoriesController#token as JSON
7953
+ Parameters: {"q"=>"skirt"}
7954
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')
7955
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
7956
+
7957
+
7958
+ Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:52:30 +0200
7959
+ Processing by CategoriesController#token as JSON
7960
+ Parameters: {"q"=>"shoes"}
7961
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
7962
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms)
7963
+
7964
+
7965
+ Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
7966
+ Processing by ProductsController#update as HTML
7967
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"}
7968
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
7969
+  (0.1ms) begin transaction
7970
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)
7971
+ 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
7972
+ SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3
7973
+ 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]]
7974
+  (1.3ms) commit transaction
7975
+ Redirected to http://127.0.0.1:54365/products
7976
+ Completed 302 Found in 15ms (ActiveRecord: 2.6ms)
7977
+
7978
+
7979
+ Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
7980
+ Processing by ProductsController#index as HTML
7981
+ Product Load (0.1ms) SELECT "products".* FROM "products" 
7982
+  (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
7983
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms)
7984
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
7985
+ 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
7986
+  (0.9ms) DELETE FROM "categories";
7987
+  (0.9ms) DELETE FROM sqlite_sequence where name = 'categories';
7988
+  (0.9ms) DELETE FROM "products";
7989
+  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';
7990
+  (0.9ms) DELETE FROM "product_has_categories";
7991
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
7992
+  (1.1ms) DELETE FROM "items";
7993
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
7994
+  (0.1ms) begin transaction
7995
+ 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]]
7996
+  (0.9ms) commit transaction
7997
+  (0.1ms) begin transaction
7998
+ 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]]
7999
+  (1.1ms) commit transaction
8000
+  (0.0ms) begin transaction
8001
+ 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]]
8002
+  (1.0ms) commit transaction
8003
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)
8004
+  (0.0ms) begin transaction
8005
+ 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]]
8006
+ 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]]
8007
+ 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]]
8008
+  (1.2ms) commit transaction
8009
+
8010
+
8011
+ Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
8012
+ Processing by ProductsController#index as HTML
8013
+ Product Load (0.2ms) SELECT "products".* FROM "products"
8014
+  (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
8015
+ Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.3ms)
8016
+  (1.1ms) DELETE FROM "categories";
8017
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'categories';
8018
+  (1.0ms) DELETE FROM "products";
8019
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';
8020
+  (1.0ms) DELETE FROM "product_has_categories";
8021
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
8022
+  (1.0ms) DELETE FROM "items";
8023
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
8024
+  (0.1ms) begin transaction
8025
+ 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]]
8026
+  (1.5ms) commit transaction
8027
+  (0.1ms) begin transaction
8028
+ 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]]
8029
+  (0.8ms) commit transaction
8030
+  (0.1ms) begin transaction
8031
+ 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]]
8032
+  (1.7ms) commit transaction
8033
+ Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
8034
+  (0.0ms) begin transaction
8035
+ 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]]
8036
+ 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]]
8037
+ 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]]
8038
+  (1.2ms) commit transaction
8039
+
8040
+
8041
+ Started GET "/products/1/edit" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
8042
+ Processing by ProductsController#edit as HTML
8043
+ Parameters: {"id"=>"1"}
8044
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
8045
+  (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
8046
+  (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
8047
+ 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
8048
+ Rendered products/_form.html.erb (6.0ms)
8049
+ Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.6ms)
8050
+
8051
+
8052
+ Started PUT "/products/1" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
8053
+ Processing by ProductsController#update as HTML
8054
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"}
8055
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
8056
+  (0.1ms) begin transaction
8057
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)
8058
+ 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
8059
+ SQL (0.2ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3
8060
+ 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]]
8061
+  (1.2ms) commit transaction
8062
+ Redirected to http://www.example.com/products
8063
+ Completed 302 Found in 8ms (ActiveRecord: 2.1ms)
8064
+
8065
+
8066
+ Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
8067
+ Processing by ProductsController#index as HTML
8068
+ Product Load (0.1ms) SELECT "products".* FROM "products"
8069
+  (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
8070
+ Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.2ms)
8071
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
8072
+ 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
8073
+  (1.0ms) DELETE FROM "categories";
8074
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
8075
+  (0.9ms) DELETE FROM "products";
8076
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';
8077
+  (0.9ms) DELETE FROM "product_has_categories";
8078
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
8079
+  (0.9ms) DELETE FROM "items";
8080
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'items';
8081
+  (0.1ms) begin transaction
8082
+ 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]]
8083
+  (1.6ms) commit transaction
8084
+  (0.1ms) begin transaction
8085
+ 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]]
8086
+  (1.0ms) commit transaction
8087
+  (0.1ms) begin transaction
8088
+ 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]]
8089
+  (1.0ms) commit transaction
8090
+
8091
+
8092
+ Started GET "/products/new" for 127.0.0.1 at 2012-10-14 00:52:31 +0200
8093
+ Processing by ProductsController#new as HTML
8094
+  (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
8095
+  (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
8096
+ Rendered products/_form.html.erb (7.1ms)
8097
+ Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.4ms)
8098
+
8099
+
8100
+ Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2012-10-14 00:52:32 +0200
8101
+ Processing by CategoriesController#token as JSON
8102
+ Parameters: {"q"=>"shoes"}
8103
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
8104
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.2ms)
8105
+
8106
+
8107
+ Started GET "/categories/token?q=pents" for 127.0.0.1 at 2012-10-14 00:52:34 +0200
8108
+ Processing by CategoriesController#token as JSON
8109
+ Parameters: {"q"=>"pents"}
8110
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%')
8111
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
8112
+
8113
+
8114
+ Started POST "/products" for 127.0.0.1 at 2012-10-14 00:52:34 +0200
8115
+ Processing by ProductsController#create as HTML
8116
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"}
8117
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
8118
+  (0.1ms) begin transaction
8119
+ 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]]
8120
+ 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]]
8121
+ 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]]
8122
+  (3.0ms) commit transaction
8123
+ Redirected to http://127.0.0.1:54365/products
8124
+ Completed 302 Found in 11ms (ActiveRecord: 4.4ms)
8125
+
8126
+
8127
+ Started GET "/products" for 127.0.0.1 at 2012-10-14 00:52:34 +0200
8128
+ Processing by ProductsController#index as HTML
8129
+ Product Load (0.1ms) SELECT "products".* FROM "products" 
8130
+  (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
8131
+ Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms)
8132
+ Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1
8133
+ 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
8134
+  (1.2ms) DELETE FROM "categories";
8135
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
8136
+  (1.1ms) DELETE FROM "products";
8137
+  (0.9ms) DELETE FROM sqlite_sequence where name = 'products';
8138
+  (1.1ms) DELETE FROM "product_has_categories";
8139
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
8140
+  (0.9ms) DELETE FROM "items";
8141
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: token_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -270,7 +270,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  segments:
272
272
  - 0
273
- hash: -3691140164500418058
273
+ hash: -1244124510800806439
274
274
  required_rubygems_version: !ruby/object:Gem::Requirement
275
275
  none: false
276
276
  requirements:
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  version: '0'
280
280
  segments:
281
281
  - 0
282
- hash: -3691140164500418058
282
+ hash: -1244124510800806439
283
283
  requirements: []
284
284
  rubyforge_project:
285
285
  rubygems_version: 1.8.24