Closed laburr27 closed 7 years ago
Can you change .create
to .create!
and see if that causes any errors to appear?
When I tried to create a new cookbook I got this back:
Started GET "/cookbooks/w3.css" for ::1 at 2017-03-02 10:42:24 -0500 Processing by CookbooksController#show as CSS Parameters: {"id"=>"w3"} Cookbook Load (0.2ms) SELECT "cookbooks".* FROM "cookbooks" WHERE "cookbooks"."id" = $1 LIMIT $2 [["id", 0], ["LIMIT", 1]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)
ActiveRecord::RecordNotFound (Couldn't find Cookbook with 'id'=w3):
app/controllers/cookbooks_controller.rb:17:in `show'
"....bunch of Rendering lines..."
Started GET "/cookbooks/w3.css" for ::1 at 2017-03-02 10:42:24 -0500 Processing by CookbooksController#show as CSS Parameters: {"id"=>"w3"} Cookbook Load (0.2ms) SELECT "cookbooks".* FROM "cookbooks" WHERE "cookbooks"."id" = $1 LIMIT $2 [["id", 0], ["LIMIT", 1]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)
ActiveRecord::RecordNotFound (Couldn't find Cookbook with 'id'=w3):
Sorry for the delay here. The fact that it's looking for a cookbook with the id w3
is strange. Is that particular string coming from somewhere?
this a problem with code incookbooks/new.html.erb
. closing for now
I tried scrubbing the code and comparing to hogwarts, tunr, and got. I expected a new cookbook to be added and redirected to that cookbook's page and edits to be saved and redirected to that cookbook's page to happen. Changes and additions are not saved and I loop back to the new or edit page after clicking the button happened instead. My repo link is: https://github.com/laburr27/cooking-library