Skip to main content

How do I fix a route -- trying to do an Edit/Update

Rails • Asked by Royal Summers

I'm getting the following error when editing and then updating a blog post:

From Chrome Browser
"No route matches [PATCH] "/authors/posts"

From Rails Server (command line)
ActionController::RoutingError (No route matches [PATCH] "/authors/posts"):

Here's the file (app/views/authors/posts/edit.html.erb)

<% provide(:page_title, "Edit #{@post.title}") %>
<% provide(:author, 'active') %>

Editing Post

<%= render 'form', post: @post, url: authors_post_url(@post) %>

<%= link_to 'Show', @post %> |
<%= link_to 'Back', authors_post_path %>


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.