StartupInstituteChicago/Fall2013JimmyGarzon — pull request #2 by jimbog (2013-11-21 23:35:36+00:00)
Title: added token-input

The checkboxes work saving and updating.
However, when using the token input field it doesn't save or update to the restaurants.categories.

I see a "Unpermitted parameters: category_tokens" message from the server logs.

This is the log I get from the server:
Started PATCH "/restaurants/2" for 127.0.0.1 at 2013-11-21 18:01:37 -0500
Processing by RestaurantsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"a2m7nbZuKtvmsq4ido99qfhCNSN77yXw/0YDkHH5w1g=", "restaurant"=>{"name"=>"MyRestaurant_2", "description"=>"", "category_tokens"=>"1", "street"=>"", "city"=>"", "state"=>"", "zipcode"=>"", "phone"=>"", "remote_image_url"=>""}, "commit"=>"Update Restaurant", "id"=>"2"}
Owner Load (0.3ms) SELECT "owners".* FROM "owners" WHERE "owners"."id" = 1 ORDER BY "owners"."id" ASC LIMIT 1
Restaurant Load (0.1ms) SELECT "restaurants".* FROM "restaurants" WHERE "restaurants"."id" = ? LIMIT 1 [["id", "2"]]
Unpermitted parameters: category_tokens
(0.1ms) begin transaction
Restaurant Load (0.2ms) SELECT "restaurants".* FROM "restaurants" WHERE "restaurants"."id" = ? LIMIT 1 [["id", 2]]
SQL (0.5ms) UPDATE "restaurants" SET "image" = ?, "updated_at" = ? WHERE "restaurants"."id" = 2 [["image", nil], ["updated_at", Thu, 21 Nov 2013 23:01:37 UTC +00:00]]
(11.3ms) commit transaction
Redirected to http://localhost:3000/restaurants/2
Completed 302 Found in 36ms (ActiveRecord: 12.5ms)