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

Ask A Question

Notifications

You’re not receiving notifications from this thread.

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

Royal Summers asked in Rails

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 %>

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,399+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.