token_field 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NTI5YjFmOTgzY2U2OTY4MTk3N2QyYTY5NDRmNmVhZjI2NTc5NDU4ZQ==
5
+ data.tar.gz: !binary |-
6
+ ZTRjNjI2ZTM4Y2FkZmRmMWM4NTgxMTEwM2ZiZmZlMzJiZDdkYmMxZQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZDk5OTYzNjYyYzFhNTlmNGZjZDUwOWUwNjA5OGFjNjM5ZTA1ZTNiMjc5NDJl
10
+ ZjI3NmJiNzVkYzU1ODVhMTVhNjg3M2U1MThhODA0MzdkMmZlNzAwNzBiMzg5
11
+ NWVhOTk5YWNiMzA3ZDEyMGEwNzc1NTI5YTY2MTBlMGUyMWQ5ZGU=
12
+ data.tar.gz: !binary |-
13
+ MjBkNTBjOGViODIxYzgwMmNlNTdiNGQxZWIyNDIwMzZlMzE4M2FkMmY0YWFj
14
+ MTllYjM0Y2VmYzI3NDJiMmI4MzYzZDVmNWU5NDgwOTY5ODQ3NmU1ZGYwNjZk
15
+ MmE5NWMzN2RiMWI4ZGIwY2I1ZmM4ZGI1MmU2M2UyOTBiN2NjMGI=
data/README.md CHANGED
@@ -87,6 +87,24 @@ in case model is in namespace for example MyApp you should use :model like this
87
87
  <%= f.token_field :parent_id, :model => "MyApp::Category", :token_url => token_categories_path %>
88
88
  <% end %>
89
89
 
90
+ if you need dynamically evaluated url of token input, you can pass inline javascript function to `:token_url` options but with `:token_url_is_function` set to `true`
91
+
92
+ <%= form_for @category do |f| %>
93
+ <%= f.token_field :parent_id, :model => :category, :token_url => "function(){ return '/hello' }", :token_url_is_function => true %>
94
+ <% end %>
95
+
96
+ also own separate function are supported
97
+
98
+ <%= form_for @category do |f| %>
99
+ <%= f.token_field :parent_id, :model => :category, :token_url => "myDynamicUrl", :token_url_is_function => true %>
100
+ <% end %>
101
+
102
+ <script type="text/javascript">
103
+ function myDynamicUrl() {
104
+ return "/my-url/";
105
+ }
106
+ </script>
107
+
90
108
  if there would be model Parent, we can omit :model parameter.
91
109
  for example in Product model like this
92
110
 
@@ -96,6 +96,7 @@ module TokenField
96
96
  association = attribute_name.to_s.gsub(/_ids?/, "").to_sym
97
97
  model = model_name.camelize.constantize
98
98
  token_url = options[:token_url]
99
+ token_url_is_function = options.fetch(:token_url_is_function) { false }
99
100
  append_to_id = options[:append_to_id]
100
101
 
101
102
  token_limit = nil
@@ -128,10 +129,12 @@ module TokenField
128
129
  on_add = options[:on_add] ? "#{options[:on_add]}" : "false"
129
130
  on_delete = options[:on_delete] ? "#{options[:on_delete]}" : "false"
130
131
 
132
+ token_url = "'#{token_url}'" unless token_url_is_function
133
+
131
134
  js_content = "
132
135
  jQuery.noConflict();
133
136
  jQuery(function() {
134
- jQuery('##{html_id}').tokenInput('#{token_url}', {
137
+ jQuery('##{html_id}').tokenInput(#{token_url}, {
135
138
  crossDomain: false,
136
139
  tokenLimit: #{token_limit.nil? ? "null" : token_limit.to_i},
137
140
  preventDuplicates: true,
@@ -1,3 +1,3 @@
1
1
  module TokenField
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  <%= simple_form_for(@item) do |f| %>
2
2
  <%= f.input :name %>
3
- <%= f.input :category_id, :as => :token, :token_url => token_categories_path %>
3
+ <%= f.input :category_id, :as => :token, :token_url => "function() { return '#{token_categories_path}'; }", :token_url_is_function => true %>
4
4
  <%= f.submit %>
5
5
  <% end %>
6
6
  <%= link_to "Listing", items_path %>
Binary file
@@ -10209,3 +10209,703 @@ Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.4ms)
10209
10209
   (1.0ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10210
10210
   (1.0ms) DELETE FROM "items";
10211
10211
   (0.4ms) DELETE FROM sqlite_sequence where name = 'items';
10212
+ Connecting to database specified by database.yml
10213
+  (0.1ms) begin transaction
10214
+ SQL (112.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:36:49 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:36:49 UTC +00:00]]
10215
+  (13.8ms) commit transaction
10216
+  (0.1ms) begin transaction
10217
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:36:49 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:36:49 UTC +00:00]]
10218
+  (1.1ms) commit transaction
10219
+  (0.0ms) begin transaction
10220
+ SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:36:49 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:36:49 UTC +00:00]]
10221
+  (1.2ms) commit transaction
10222
+ Connecting to database specified by database.yml
10223
+  (0.1ms) begin transaction
10224
+ SQL (33.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:14 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:14 UTC +00:00]]
10225
+  (0.9ms) commit transaction
10226
+  (0.1ms) begin transaction
10227
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:14 UTC +00:00], ["name", "new parent"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:14 UTC +00:00]]
10228
+  (1.2ms) commit transaction
10229
+  (0.0ms) begin transaction
10230
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:14 UTC +00:00], ["name", "category_1"], ["parent_id", 4], ["updated_at", Tue, 04 Feb 2014 14:38:14 UTC +00:00]]
10231
+  (1.1ms) commit transaction
10232
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 4 LIMIT 1
10233
+
10234
+
10235
+ Started GET "/categories/6/edit" for 127.0.0.1 at 2014-02-04 15:38:22 +0100
10236
+ Processing by CategoriesController#edit as HTML
10237
+ Parameters: {"id"=>"6"}
10238
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "6"]]
10239
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 4 LIMIT 1
10240
+ Rendered categories/_form.html.erb (312.0ms)
10241
+ Rendered categories/edit.html.erb within layouts/application (328.9ms)
10242
+ Completed 200 OK in 514ms (Views: 511.0ms | ActiveRecord: 0.7ms)
10243
+
10244
+
10245
+ Started GET "/assets/application.css" for 127.0.0.1 at 2014-02-04 15:38:23 +0100
10246
+ Served asset /application.css - 200 OK (51ms)
10247
+
10248
+
10249
+ Started GET "/assets/application.js" for 127.0.0.1 at 2014-02-04 15:38:23 +0100
10250
+ Served asset /application.js - 200 OK (70ms)
10251
+
10252
+
10253
+ Started GET "/categories/token?q=new+parent" for 127.0.0.1 at 2014-02-04 15:38:24 +0100
10254
+ Processing by CategoriesController#token as JSON
10255
+ Parameters: {"q"=>"new parent"}
10256
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%new parent%')
10257
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.2ms)
10258
+
10259
+
10260
+ Started PUT "/categories/6" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10261
+ Processing by CategoriesController#update as HTML
10262
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_1", "parent_id"=>"5"}, "commit"=>"Update Category", "id"=>"6"}
10263
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "6"]]
10264
+  (0.1ms) begin transaction
10265
+  (0.4ms) UPDATE "categories" SET "parent_id" = 5, "updated_at" = '2014-02-04 14:38:25.345939' WHERE "categories"."id" = 6
10266
+  (1.1ms) commit transaction
10267
+ Redirected to http://127.0.0.1:53926/categories
10268
+ Completed 302 Found in 7ms (ActiveRecord: 1.8ms)
10269
+
10270
+
10271
+ Started GET "/categories" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10272
+ Processing by CategoriesController#index as HTML
10273
+ Category Load (0.2ms) SELECT "categories".* FROM "categories"
10274
+ Rendered categories/index.html.erb within layouts/application (2.9ms)
10275
+ Completed 200 OK in 42ms (Views: 40.6ms | ActiveRecord: 0.2ms)
10276
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 6]]
10277
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 5 LIMIT 1
10278
+  (1.2ms) DELETE FROM "categories";
10279
+  (1.4ms) DELETE FROM sqlite_sequence where name = 'categories';
10280
+  (1.3ms) DELETE FROM "products";
10281
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10282
+  (1.0ms) DELETE FROM "product_has_categories";
10283
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10284
+  (1.2ms) DELETE FROM "items";
10285
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10286
+  (0.1ms) begin transaction
10287
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00]]
10288
+  (1.1ms) commit transaction
10289
+
10290
+
10291
+ Started GET "/categories/new" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10292
+ Processing by CategoriesController#new as HTML
10293
+ Rendered categories/_form.html.erb (3.0ms)
10294
+ Completed 200 OK in 19ms (Views: 18.4ms | ActiveRecord: 0.0ms)
10295
+
10296
+
10297
+ Started POST "/categories" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10298
+ Processing by CategoriesController#create as HTML
10299
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}
10300
+  (0.1ms) begin transaction
10301
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00]]
10302
+  (1.0ms) commit transaction
10303
+ Redirected to http://www.example.com/categories
10304
+ Completed 302 Found in 4ms (ActiveRecord: 1.6ms)
10305
+
10306
+
10307
+ Started GET "/categories" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10308
+ Processing by CategoriesController#index as HTML
10309
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" 
10310
+ Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)
10311
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1
10312
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10313
+  (21.5ms) DELETE FROM "categories";
10314
+  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';
10315
+  (1.2ms) DELETE FROM "products";
10316
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10317
+  (1.2ms) DELETE FROM "product_has_categories";
10318
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10319
+  (1.0ms) DELETE FROM "items";
10320
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10321
+  (0.1ms) begin transaction
10322
+ SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00]]
10323
+  (1.0ms) commit transaction
10324
+  (0.1ms) begin transaction
10325
+ SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00], ["name", "category_2"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00]]
10326
+  (1.1ms) commit transaction
10327
+  (0.1ms) begin transaction
10328
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00], ["name", "category_3"], ["parent_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:25 UTC +00:00]]
10329
+  (1.1ms) commit transaction
10330
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10331
+
10332
+
10333
+ Started GET "/categories/3/edit" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10334
+ Processing by CategoriesController#edit as HTML
10335
+ Parameters: {"id"=>"3"}
10336
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
10337
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10338
+ Rendered categories/_form.html.erb (4.5ms)
10339
+ Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.3ms)
10340
+
10341
+
10342
+ Started PUT "/categories/3" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10343
+ Processing by CategoriesController#update as HTML
10344
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"category_3", "parent_id"=>"2"}, "commit"=>"Update Category", "id"=>"3"}
10345
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", "3"]]
10346
+  (0.0ms) begin transaction
10347
+  (0.3ms) UPDATE "categories" SET "parent_id" = 2, "updated_at" = '2014-02-04 14:38:25.985135' WHERE "categories"."id" = 3
10348
+  (1.0ms) commit transaction
10349
+ Redirected to http://www.example.com/categories
10350
+ Completed 302 Found in 4ms (ActiveRecord: 1.4ms)
10351
+
10352
+
10353
+ Started GET "/categories" for 127.0.0.1 at 2014-02-04 15:38:25 +0100
10354
+ Processing by CategoriesController#index as HTML
10355
+ Category Load (0.1ms) SELECT "categories".* FROM "categories"
10356
+ Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)
10357
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 3]]
10358
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
10359
+  (1.3ms) DELETE FROM "categories";
10360
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
10361
+  (1.9ms) DELETE FROM "products";
10362
+  (0.2ms) DELETE FROM sqlite_sequence where name = 'products';
10363
+  (1.1ms) DELETE FROM "product_has_categories";
10364
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10365
+  (1.3ms) DELETE FROM "items";
10366
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10367
+  (0.1ms) begin transaction
10368
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:26 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:26 UTC +00:00]]
10369
+  (1.0ms) commit transaction
10370
+
10371
+
10372
+ Started GET "/categories" for 127.0.0.1 at 2014-02-04 15:38:26 +0100
10373
+ Processing by CategoriesController#index as HTML
10374
+ Category Load (0.2ms) SELECT "categories".* FROM "categories"
10375
+ Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.2ms)
10376
+  (1.1ms) DELETE FROM "categories";
10377
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
10378
+  (1.3ms) DELETE FROM "products";
10379
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10380
+  (1.2ms) DELETE FROM "product_has_categories";
10381
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10382
+  (1.3ms) DELETE FROM "items";
10383
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10384
+  (0.1ms) begin transaction
10385
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:26 UTC +00:00], ["name", "wood"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:26 UTC +00:00]]
10386
+  (1.2ms) commit transaction
10387
+
10388
+
10389
+ Started GET "/categories/new" for 127.0.0.1 at 2014-02-04 15:38:26 +0100
10390
+ Processing by CategoriesController#new as HTML
10391
+ Rendered categories/_form.html.erb (2.5ms)
10392
+ Completed 200 OK in 4ms (Views: 3.8ms | ActiveRecord: 0.0ms)
10393
+
10394
+
10395
+ Started GET "/categories/token?q=wood" for 127.0.0.1 at 2014-02-04 15:38:26 +0100
10396
+ Processing by CategoriesController#token as JSON
10397
+ Parameters: {"q"=>"wood"}
10398
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%wood%')
10399
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
10400
+
10401
+
10402
+ Started POST "/categories" for 127.0.0.1 at 2014-02-04 15:38:27 +0100
10403
+ Processing by CategoriesController#create as HTML
10404
+ Parameters: {"utf8"=>"✓", "category"=>{"name"=>"hello", "parent_id"=>"1"}, "commit"=>"Create Category"}
10405
+  (0.1ms) begin transaction
10406
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:27 UTC +00:00], ["name", "hello"], ["parent_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:27 UTC +00:00]]
10407
+  (1.1ms) commit transaction
10408
+ Redirected to http://127.0.0.1:53926/categories
10409
+ Completed 302 Found in 4ms (ActiveRecord: 1.7ms)
10410
+
10411
+
10412
+ Started GET "/categories" for 127.0.0.1 at 2014-02-04 15:38:27 +0100
10413
+ Processing by CategoriesController#index as HTML
10414
+ Category Load (0.2ms) SELECT "categories".* FROM "categories"
10415
+ Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.2ms)
10416
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" ORDER BY "categories"."id" DESC LIMIT 1
10417
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10418
+  (1.2ms) DELETE FROM "categories";
10419
+  (1.6ms) DELETE FROM sqlite_sequence where name = 'categories';
10420
+  (1.1ms) DELETE FROM "products";
10421
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10422
+  (1.1ms) DELETE FROM "product_has_categories";
10423
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10424
+  (1.2ms) DELETE FROM "items";
10425
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10426
+  (0.1ms) begin transaction
10427
+ SQL (7.0ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:27 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:27 UTC +00:00]]
10428
+  (1.2ms) commit transaction
10429
+  (0.1ms) begin transaction
10430
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:28 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:28 UTC +00:00]]
10431
+  (16.5ms) commit transaction
10432
+  (0.1ms) begin transaction
10433
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:28 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:28 UTC +00:00]]
10434
+  (1.0ms) commit transaction
10435
+  (0.1ms) begin transaction
10436
+ SQL (0.6ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:28 UTC +00:00], ["name", "item"], ["updated_at", Tue, 04 Feb 2014 14:38:28 UTC +00:00]]
10437
+  (1.1ms) commit transaction
10438
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10439
+
10440
+
10441
+ Started GET "/items/1/edit" for 127.0.0.1 at 2014-02-04 15:38:28 +0100
10442
+ Processing by ItemsController#edit as HTML
10443
+ Parameters: {"id"=>"1"}
10444
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
10445
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10446
+ Rendered items/_form.html.erb (539.8ms)
10447
+ Completed 200 OK in 616ms (Views: 613.8ms | ActiveRecord: 0.5ms)
10448
+
10449
+
10450
+ Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2014-02-04 15:38:29 +0100
10451
+ Processing by CategoriesController#token as JSON
10452
+ Parameters: {"q"=>"skirt"}
10453
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')
10454
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
10455
+
10456
+
10457
+ Started PUT "/items/1" for 127.0.0.1 at 2014-02-04 15:38:30 +0100
10458
+ Processing by ItemsController#update as HTML
10459
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
10460
+ Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
10461
+  (0.1ms) begin transaction
10462
+  (0.4ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2014-02-04 14:38:30.234155' WHERE "items"."id" = 1
10463
+  (1.0ms) commit transaction
10464
+ Redirected to http://127.0.0.1:53926/items
10465
+ Completed 302 Found in 6ms (ActiveRecord: 1.6ms)
10466
+
10467
+
10468
+ Started GET "/items" for 127.0.0.1 at 2014-02-04 15:38:30 +0100
10469
+ Processing by ItemsController#index as HTML
10470
+ Item Load (0.2ms) SELECT "items".* FROM "items" 
10471
+ Completed 200 OK in 87ms (Views: 85.5ms | ActiveRecord: 0.2ms)
10472
+ Item Load (0.3ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
10473
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
10474
+  (35.7ms) DELETE FROM "categories";
10475
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';
10476
+  (1.3ms) DELETE FROM "products";
10477
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10478
+  (1.3ms) DELETE FROM "product_has_categories";
10479
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10480
+  (1.2ms) DELETE FROM "items";
10481
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';
10482
+  (0.1ms) begin transaction
10483
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10484
+  (1.1ms) commit transaction
10485
+  (0.1ms) begin transaction
10486
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10487
+  (1.9ms) commit transaction
10488
+  (0.2ms) begin transaction
10489
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10490
+  (1.2ms) commit transaction
10491
+
10492
+
10493
+ Started GET "/items/new" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10494
+ Processing by ItemsController#new as HTML
10495
+ Rendered items/_form.html.erb (6.0ms)
10496
+ Completed 200 OK in 57ms (Views: 56.4ms | ActiveRecord: 0.0ms)
10497
+
10498
+
10499
+ Started POST "/items" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10500
+ Processing by ItemsController#create as HTML
10501
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
10502
+  (0.1ms) begin transaction
10503
+ SQL (0.4ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "hello"], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10504
+  (23.3ms) commit transaction
10505
+ Redirected to http://www.example.com/items
10506
+ Completed 302 Found in 26ms (ActiveRecord: 23.8ms)
10507
+
10508
+
10509
+ Started GET "/items" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10510
+ Processing by ItemsController#index as HTML
10511
+ Item Load (0.2ms) SELECT "items".* FROM "items"
10512
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.2ms)
10513
+ Item Load (0.1ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
10514
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10515
+  (71.2ms) DELETE FROM "categories";
10516
+  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';
10517
+  (1.1ms) DELETE FROM "products";
10518
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10519
+  (1.1ms) DELETE FROM "product_has_categories";
10520
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10521
+  (0.9ms) DELETE FROM "items";
10522
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'items';
10523
+  (0.1ms) begin transaction
10524
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10525
+  (1.0ms) commit transaction
10526
+  (0.1ms) begin transaction
10527
+ SQL (0.7ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10528
+  (1.2ms) commit transaction
10529
+  (0.1ms) begin transaction
10530
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10531
+  (1.2ms) commit transaction
10532
+  (0.0ms) begin transaction
10533
+ SQL (0.3ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "item"], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10534
+  (1.0ms) commit transaction
10535
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10536
+
10537
+
10538
+ Started GET "/items/1/edit" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10539
+ Processing by ItemsController#edit as HTML
10540
+ Parameters: {"id"=>"1"}
10541
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
10542
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10543
+ Rendered items/_form.html.erb (4.7ms)
10544
+ Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.3ms)
10545
+
10546
+
10547
+ Started PUT "/items/1" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10548
+ Processing by ItemsController#update as HTML
10549
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"item", "category_id"=>"2"}, "commit"=>"Update Item", "id"=>"1"}
10550
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
10551
+  (0.0ms) begin transaction
10552
+  (0.3ms) UPDATE "items" SET "category_id" = 2, "updated_at" = '2014-02-04 14:38:31.655579' WHERE "items"."id" = 1
10553
+  (1.6ms) commit transaction
10554
+ Redirected to http://www.example.com/items
10555
+ Completed 302 Found in 4ms (ActiveRecord: 2.0ms)
10556
+
10557
+
10558
+ Started GET "/items" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10559
+ Processing by ItemsController#index as HTML
10560
+ Item Load (0.2ms) SELECT "items".* FROM "items"
10561
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.2ms)
10562
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
10563
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 2 LIMIT 1
10564
+  (1.6ms) DELETE FROM "categories";
10565
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
10566
+  (1.5ms) DELETE FROM "products";
10567
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10568
+  (1.1ms) DELETE FROM "product_has_categories";
10569
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10570
+  (1.1ms) DELETE FROM "items";
10571
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';
10572
+  (0.1ms) begin transaction
10573
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10574
+  (1.4ms) commit transaction
10575
+  (0.1ms) begin transaction
10576
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10577
+  (1.2ms) commit transaction
10578
+  (0.0ms) begin transaction
10579
+ SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10580
+  (1.0ms) commit transaction
10581
+  (0.0ms) begin transaction
10582
+ SQL (0.3ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00], ["name", "new one"], ["updated_at", Tue, 04 Feb 2014 14:38:31 UTC +00:00]]
10583
+  (1.4ms) commit transaction
10584
+
10585
+
10586
+ Started GET "/items" for 127.0.0.1 at 2014-02-04 15:38:31 +0100
10587
+ Processing by ItemsController#index as HTML
10588
+ Item Load (0.2ms) SELECT "items".* FROM "items" 
10589
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.2ms)
10590
+  (2.6ms) DELETE FROM "categories";
10591
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';
10592
+  (1.1ms) DELETE FROM "products";
10593
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10594
+  (1.2ms) DELETE FROM "product_has_categories";
10595
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10596
+  (1.0ms) DELETE FROM "items";
10597
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'items';
10598
+  (0.1ms) begin transaction
10599
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:32 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:32 UTC +00:00]]
10600
+  (1.6ms) commit transaction
10601
+  (0.1ms) begin transaction
10602
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:32 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:32 UTC +00:00]]
10603
+  (1.1ms) commit transaction
10604
+  (0.0ms) begin transaction
10605
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:32 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:32 UTC +00:00]]
10606
+  (1.1ms) commit transaction
10607
+
10608
+
10609
+ Started GET "/items/new" for 127.0.0.1 at 2014-02-04 15:38:32 +0100
10610
+ Processing by ItemsController#new as HTML
10611
+ Rendered items/_form.html.erb (3.9ms)
10612
+ Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms)
10613
+
10614
+
10615
+ Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2014-02-04 15:38:33 +0100
10616
+ Processing by CategoriesController#token as JSON
10617
+ Parameters: {"q"=>"shoes"}
10618
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
10619
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
10620
+
10621
+
10622
+ Started POST "/items" for 127.0.0.1 at 2014-02-04 15:38:34 +0100
10623
+ Processing by ItemsController#create as HTML
10624
+ Parameters: {"utf8"=>"✓", "item"=>{"name"=>"hello", "category_id"=>"1"}, "commit"=>"Create Item"}
10625
+  (0.1ms) begin transaction
10626
+ SQL (0.5ms) INSERT INTO "items" ("category_id", "created_at", "name", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["name", "hello"], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10627
+  (1.1ms) commit transaction
10628
+ Redirected to http://127.0.0.1:53926/items
10629
+ Completed 302 Found in 3ms (ActiveRecord: 1.7ms)
10630
+
10631
+
10632
+ Started GET "/items" for 127.0.0.1 at 2014-02-04 15:38:34 +0100
10633
+ Processing by ItemsController#index as HTML
10634
+ Item Load (0.2ms) SELECT "items".* FROM "items" 
10635
+ Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)
10636
+ Item Load (0.2ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1
10637
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1
10638
+  (1.3ms) DELETE FROM "categories";
10639
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';
10640
+  (1.1ms) DELETE FROM "products";
10641
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'products';
10642
+  (0.9ms) DELETE FROM "product_has_categories";
10643
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10644
+  (1.0ms) DELETE FROM "items";
10645
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'items';
10646
+  (0.1ms) begin transaction
10647
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10648
+  (1.2ms) commit transaction
10649
+  (0.1ms) begin transaction
10650
+ SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10651
+  (1.1ms) commit transaction
10652
+  (0.0ms) begin transaction
10653
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10654
+  (1.1ms) commit transaction
10655
+ Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
10656
+  (0.0ms) begin transaction
10657
+ SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["name", "product"], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10658
+ SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10659
+ SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:34 UTC +00:00]]
10660
+  (1.4ms) commit transaction
10661
+
10662
+
10663
+ Started GET "/products/1/edit" for 127.0.0.1 at 2014-02-04 15:38:34 +0100
10664
+ Processing by ProductsController#edit as HTML
10665
+ Parameters: {"id"=>"1"}
10666
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
10667
+  (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
10668
+  (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
10669
+ 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
10670
+ Rendered products/_form.html.erb (22.4ms)
10671
+ Completed 200 OK in 68ms (Views: 65.3ms | ActiveRecord: 0.9ms)
10672
+
10673
+
10674
+ Started GET "/categories/token?q=skirt" for 127.0.0.1 at 2014-02-04 15:38:35 +0100
10675
+ Processing by CategoriesController#token as JSON
10676
+ Parameters: {"q"=>"skirt"}
10677
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%skirt%')
10678
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
10679
+
10680
+
10681
+ Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2014-02-04 15:38:37 +0100
10682
+ Processing by CategoriesController#token as JSON
10683
+ Parameters: {"q"=>"shoes"}
10684
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
10685
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
10686
+
10687
+
10688
+ Started PUT "/products/1" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10689
+ Processing by ProductsController#update as HTML
10690
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2,1"}, "commit"=>"Update Product", "id"=>"1"}
10691
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
10692
+  (0.1ms) begin transaction
10693
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)
10694
+ 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
10695
+ SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3
10696
+ SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10697
+  (9.2ms) commit transaction
10698
+ Redirected to http://127.0.0.1:53926/products
10699
+ Completed 302 Found in 61ms (ActiveRecord: 10.2ms)
10700
+
10701
+
10702
+ Started GET "/products" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10703
+ Processing by ProductsController#index as HTML
10704
+ Product Load (0.2ms) SELECT "products".* FROM "products"
10705
+  (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
10706
+ Completed 200 OK in 35ms (Views: 34.0ms | ActiveRecord: 0.4ms)
10707
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
10708
+ 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
10709
+  (1.3ms) DELETE FROM "categories";
10710
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
10711
+  (1.0ms) DELETE FROM "products";
10712
+  (1.0ms) DELETE FROM sqlite_sequence where name = 'products';
10713
+  (1.1ms) DELETE FROM "product_has_categories";
10714
+  (1.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10715
+  (1.2ms) DELETE FROM "items";
10716
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10717
+  (0.1ms) begin transaction
10718
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10719
+  (1.2ms) commit transaction
10720
+  (0.0ms) begin transaction
10721
+ SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10722
+  (0.9ms) commit transaction
10723
+  (0.1ms) begin transaction
10724
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10725
+  (1.1ms) commit transaction
10726
+
10727
+
10728
+ Started GET "/products/new" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10729
+ Processing by ProductsController#new as HTML
10730
+  (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
10731
+  (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
10732
+ Rendered products/_form.html.erb (5.2ms)
10733
+ Completed 200 OK in 39ms (Views: 38.5ms | ActiveRecord: 0.3ms)
10734
+
10735
+
10736
+ Started POST "/products" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10737
+ Processing by ProductsController#create as HTML
10738
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"3, 1"}, "commit"=>"Create Product"}
10739
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (3, 1)
10740
+  (0.0ms) begin transaction
10741
+ SQL (20.0ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "hello"], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10742
+ SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10743
+ SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10744
+  (10.3ms) commit transaction
10745
+ Redirected to http://www.example.com/products
10746
+ Completed 302 Found in 42ms (ActiveRecord: 30.9ms)
10747
+
10748
+
10749
+ Started GET "/products" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10750
+ Processing by ProductsController#index as HTML
10751
+ Product Load (0.1ms) SELECT "products".* FROM "products" 
10752
+  (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
10753
+ Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.3ms)
10754
+ Product Load (0.2ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1
10755
+ 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
10756
+  (31.6ms) DELETE FROM "categories";
10757
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'categories';
10758
+  (1.0ms) DELETE FROM "products";
10759
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';
10760
+  (1.2ms) DELETE FROM "product_has_categories";
10761
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10762
+  (1.1ms) DELETE FROM "items";
10763
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10764
+  (0.1ms) begin transaction
10765
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10766
+  (1.0ms) commit transaction
10767
+  (0.1ms) begin transaction
10768
+ SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10769
+  (1.3ms) commit transaction
10770
+  (0.1ms) begin transaction
10771
+ SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10772
+  (1.2ms) commit transaction
10773
+ Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
10774
+  (0.0ms) begin transaction
10775
+ SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "product"], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10776
+ SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10777
+ SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10778
+  (2.1ms) commit transaction
10779
+
10780
+
10781
+ Started GET "/products/1/edit" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10782
+ Processing by ProductsController#edit as HTML
10783
+ Parameters: {"id"=>"1"}
10784
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
10785
+  (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
10786
+  (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
10787
+ 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
10788
+ Rendered products/_form.html.erb (8.4ms)
10789
+ Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.6ms)
10790
+
10791
+
10792
+ Started PUT "/products/1" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10793
+ Processing by ProductsController#update as HTML
10794
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"product", "category_ids"=>"2, 1"}, "commit"=>"Update Product", "id"=>"1"}
10795
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", "1"]]
10796
+  (0.1ms) begin transaction
10797
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (2, 1)
10798
+ 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
10799
+ SQL (0.3ms) DELETE FROM "product_has_categories" WHERE "product_has_categories"."product_id" = 1 AND "product_has_categories"."category_id" = 3
10800
+ SQL (0.3ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10801
+  (1.1ms) commit transaction
10802
+ Redirected to http://www.example.com/products
10803
+ Completed 302 Found in 8ms (ActiveRecord: 2.2ms)
10804
+
10805
+
10806
+ Started GET "/products" for 127.0.0.1 at 2014-02-04 15:38:38 +0100
10807
+ Processing by ProductsController#index as HTML
10808
+ Product Load (0.1ms) SELECT "products".* FROM "products" 
10809
+  (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
10810
+ Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.3ms)
10811
+ Product Load (0.1ms) SELECT "products".* FROM "products" WHERE "products"."id" = ? LIMIT 1 [["id", 1]]
10812
+ 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
10813
+  (77.8ms) DELETE FROM "categories";
10814
+  (10.6ms) DELETE FROM sqlite_sequence where name = 'categories';
10815
+  (4.5ms) DELETE FROM "products";
10816
+  (12.5ms) DELETE FROM sqlite_sequence where name = 'products';
10817
+  (7.2ms) DELETE FROM "product_has_categories";
10818
+  (3.3ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10819
+  (14.1ms) DELETE FROM "items";
10820
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10821
+  (0.1ms) begin transaction
10822
+ SQL (0.6ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:38 UTC +00:00]]
10823
+  (27.0ms) commit transaction
10824
+  (0.1ms) begin transaction
10825
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10826
+  (12.7ms) commit transaction
10827
+  (0.1ms) begin transaction
10828
+ SQL (0.5ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10829
+  (1.0ms) commit transaction
10830
+ Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 2)
10831
+  (0.0ms) begin transaction
10832
+ SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["name", "new one"], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10833
+ SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10834
+ SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 2], ["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10835
+  (1.8ms) commit transaction
10836
+
10837
+
10838
+ Started GET "/products" for 127.0.0.1 at 2014-02-04 15:38:39 +0100
10839
+ Processing by ProductsController#index as HTML
10840
+ Product Load (0.2ms) SELECT "products".* FROM "products"
10841
+  (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
10842
+ Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.3ms)
10843
+  (1.3ms) DELETE FROM "categories";
10844
+  (1.3ms) DELETE FROM sqlite_sequence where name = 'categories';
10845
+  (1.2ms) DELETE FROM "products";
10846
+  (1.1ms) DELETE FROM sqlite_sequence where name = 'products';
10847
+  (1.1ms) DELETE FROM "product_has_categories";
10848
+  (1.4ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10849
+  (1.0ms) DELETE FROM "items";
10850
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'items';
10851
+  (0.1ms) begin transaction
10852
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["name", "shoes"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10853
+  (1.8ms) commit transaction
10854
+  (0.1ms) begin transaction
10855
+ SQL (0.4ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["name", "skirt"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10856
+  (1.1ms) commit transaction
10857
+  (0.0ms) begin transaction
10858
+ SQL (0.3ms) INSERT INTO "categories" ("created_at", "name", "parent_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00], ["name", "pents"], ["parent_id", nil], ["updated_at", Tue, 04 Feb 2014 14:38:39 UTC +00:00]]
10859
+  (1.0ms) commit transaction
10860
+
10861
+
10862
+ Started GET "/products/new" for 127.0.0.1 at 2014-02-04 15:38:39 +0100
10863
+ Processing by ProductsController#new as HTML
10864
+  (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
10865
+  (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
10866
+ Rendered products/_form.html.erb (4.5ms)
10867
+ Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.2ms)
10868
+
10869
+
10870
+ Started GET "/categories/token?q=shoes" for 127.0.0.1 at 2014-02-04 15:38:40 +0100
10871
+ Processing by CategoriesController#token as JSON
10872
+ Parameters: {"q"=>"shoes"}
10873
+ Category Load (0.2ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%shoes%')
10874
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)
10875
+
10876
+
10877
+ Started GET "/categories/token?q=pents" for 127.0.0.1 at 2014-02-04 15:38:41 +0100
10878
+ Processing by CategoriesController#token as JSON
10879
+ Parameters: {"q"=>"pents"}
10880
+ Category Load (0.1ms) SELECT "categories".* FROM "categories" WHERE (categories.name like '%pents%')
10881
+ Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)
10882
+
10883
+
10884
+ Started POST "/products" for 127.0.0.1 at 2014-02-04 15:38:42 +0100
10885
+ Processing by ProductsController#create as HTML
10886
+ Parameters: {"utf8"=>"✓", "product"=>{"name"=>"hello", "category_ids"=>"1,3"}, "commit"=>"Create Product"}
10887
+ Category Load (0.3ms) SELECT "categories".* FROM "categories" WHERE "categories"."id" IN (1, 3)
10888
+  (0.1ms) begin transaction
10889
+ SQL (0.6ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 04 Feb 2014 14:38:42 UTC +00:00], ["name", "hello"], ["updated_at", Tue, 04 Feb 2014 14:38:42 UTC +00:00]]
10890
+ SQL (0.2ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 1], ["created_at", Tue, 04 Feb 2014 14:38:42 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:42 UTC +00:00]]
10891
+ SQL (0.1ms) INSERT INTO "product_has_categories" ("category_id", "created_at", "product_id", "updated_at") VALUES (?, ?, ?, ?) [["category_id", 3], ["created_at", Tue, 04 Feb 2014 14:38:42 UTC +00:00], ["product_id", 1], ["updated_at", Tue, 04 Feb 2014 14:38:42 UTC +00:00]]
10892
+  (1.1ms) commit transaction
10893
+ Redirected to http://127.0.0.1:53926/products
10894
+ Completed 302 Found in 8ms (ActiveRecord: 2.4ms)
10895
+
10896
+
10897
+ Started GET "/products" for 127.0.0.1 at 2014-02-04 15:38:42 +0100
10898
+ Processing by ProductsController#index as HTML
10899
+ Product Load (0.2ms) SELECT "products".* FROM "products" 
10900
+  (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
10901
+ Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.3ms)
10902
+ Product Load (0.3ms) SELECT "products".* FROM "products" ORDER BY "products"."id" DESC LIMIT 1
10903
+ 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
10904
+  (1.4ms) DELETE FROM "categories";
10905
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'categories';
10906
+  (1.2ms) DELETE FROM "products";
10907
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'products';
10908
+  (1.2ms) DELETE FROM "product_has_categories";
10909
+  (1.2ms) DELETE FROM sqlite_sequence where name = 'product_has_categories';
10910
+  (1.3ms) DELETE FROM "items";
10911
+  (0.2ms) DELETE FROM sqlite_sequence where name = 'items';
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: token_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Miroslav Hettes
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-24 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: sqlite3
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec-rails
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: factory_girl_rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: database_cleaner
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: capybara
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,19 +97,17 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: selenium-webdriver
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
117
- version: 2.25.0
103
+ version: 2.39.0
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
125
- version: 2.25.0
110
+ version: 2.39.0
126
111
  description: Form helper with how to section for using token input jquery plugin in
127
112
  application
128
113
  email:
@@ -131,15 +116,17 @@ executables: []
131
116
  extensions: []
132
117
  extra_rdoc_files: []
133
118
  files:
119
+ - MIT-LICENSE
120
+ - README.md
121
+ - Rakefile
122
+ - lib/token_field.rb
134
123
  - lib/token_field/capybara/dsl.rb
135
124
  - lib/token_field/engine.rb
136
125
  - lib/token_field/form_builder.rb
137
126
  - lib/token_field/simple_form/token_input.rb
138
127
  - lib/token_field/version.rb
139
- - lib/token_field.rb
140
- - MIT-LICENSE
141
- - Rakefile
142
- - README.md
128
+ - spec/dummy/README.rdoc
129
+ - spec/dummy/Rakefile
143
130
  - spec/dummy/app/assets/javascripts/application.js
144
131
  - spec/dummy/app/assets/stylesheets/application.css
145
132
  - spec/dummy/app/controllers/application_controller.rb
@@ -164,6 +151,7 @@ files:
164
151
  - spec/dummy/app/views/products/edit.html.erb
165
152
  - spec/dummy/app/views/products/index.html.erb
166
153
  - spec/dummy/app/views/products/new.html.erb
154
+ - spec/dummy/config.ru
167
155
  - spec/dummy/config/application.rb
168
156
  - spec/dummy/config/boot.rb
169
157
  - spec/dummy/config/database.yml
@@ -181,7 +169,6 @@ files:
181
169
  - spec/dummy/config/locales/en.yml
182
170
  - spec/dummy/config/locales/simple_form.en.yml
183
171
  - spec/dummy/config/routes.rb
184
- - spec/dummy/config.ru
185
172
  - spec/dummy/db/development.sqlite3
186
173
  - spec/dummy/db/migrate/20121012100526_create_categories.rb
187
174
  - spec/dummy/db/migrate/20121012235444_create_products.rb
@@ -196,8 +183,6 @@ files:
196
183
  - spec/dummy/public/422.html
197
184
  - spec/dummy/public/500.html
198
185
  - spec/dummy/public/favicon.ico
199
- - spec/dummy/Rakefile
200
- - spec/dummy/README.rdoc
201
186
  - spec/dummy/script/rails
202
187
  - spec/dummy/tmp/cache/assets/BFD/FA0/sprockets%2F956cc6670041848963c189f12a536075
203
188
  - spec/dummy/tmp/cache/assets/C68/F70/sprockets%2F03000591510dc6784ee531c103e66a7a
@@ -226,33 +211,26 @@ files:
226
211
  - spec/spec_helper.rb
227
212
  homepage: https://github.com/mirrec/token_field
228
213
  licenses: []
214
+ metadata: {}
229
215
  post_install_message:
230
216
  rdoc_options: []
231
217
  require_paths:
232
218
  - lib
233
219
  required_ruby_version: !ruby/object:Gem::Requirement
234
- none: false
235
220
  requirements:
236
221
  - - ! '>='
237
222
  - !ruby/object:Gem::Version
238
223
  version: '0'
239
- segments:
240
- - 0
241
- hash: -297572229318511919
242
224
  required_rubygems_version: !ruby/object:Gem::Requirement
243
- none: false
244
225
  requirements:
245
226
  - - ! '>='
246
227
  - !ruby/object:Gem::Version
247
228
  version: '0'
248
- segments:
249
- - 0
250
- hash: -297572229318511919
251
229
  requirements: []
252
230
  rubyforge_project:
253
- rubygems_version: 1.8.24
231
+ rubygems_version: 2.2.1
254
232
  signing_key:
255
- specification_version: 3
233
+ specification_version: 4
256
234
  summary: Form helper input for jquery token input
257
235
  test_files:
258
236
  - spec/dummy/app/assets/javascripts/application.js