- Where Developers Learn, Share, & Build Careers
I do not understand why I'm getting the error message when trying to update a recipe
This is my output of rack routes
Recipes GET / craps (.: Format) recipes # index post / repections (.: Format) recipes # create new_recipe / recipes / new (.: Format) Recipes # New Edit_Please / Receive / Edit / Edit Content (.: Format) Recipes Edit Recipe / Crazy / :( (.: Format) Recipes # Show PUT / Repipes /: ((:: format) Recipes # Update DELETE /recipes/:id(.:format) Recipes #Foot Root / public_pages # Index < / Code> My Controller looks like this
def edit @ recipes = acupuncture.fund (param [: id]) end DEF update @recipe = recipe.find (Params [: id]) If @ recipe.update_attributes (Param [: recipe]) redirect_to recipes_path, notice = & gt; "Successfully updated recipe" and render: verb = & gt; edit R 'End End and my link to edit the post
& lt;% = link_to "edit method", edit_recipe_path (@recipe )% & Gt; is a complete error (this is when the recipes are trying to access the page
routing error not matching the route {: action = & Try to run the Rake Route for more information on available routes: gt; "edit",: controller = & gt; "recipes"). And in the end I am using, the only thing I can think of is that there is an issue with my form, although I thought that you are new to editing Can you use the same form? However, I may be completely wrong
Anyone have any ideas
< P> OK, it seems like it is necessary in my opinion & quot; link = 'Edit method "Edit_recipe_path (r.id)%> It was because I
& lt;% @ recipes.each do | R |%>
Comments
Post a Comment