Michael Wales

Joined

1,840 Experience
18 Lessons Completed
0 Questions Solved

Activity

Posted in Adding a New Blog Post Action Discussion

Class and then I'm assuming a memory path or some other unique ID of the class.

Like "class <123456>"

Going the resource route that is shared a few lessons later works. I think in Rails 7.1 you just can't use the form_with helper without having the create/POST route helper as well. Essentially you need this lesson and the next before you can reload the page.

Posted in Adding a New Blog Post Action Discussion

I am following these tutorials on a slightly newer version of Rails (7.1.3) and I'm thinking there may have been a change there where it checks if the POST endpoint exists prior to rendering the form and errors out if it does not.

Posted in Adding a New Blog Post Action Discussion

I fixed this by using this line instead: resources :blog_posts, only: [:new, :create]

Posted in Adding a New Blog Post Action Discussion

I'm stuck with a undefined methodblog_posts_path' for an instance of...error that I feel like I'm just not understanding the routing magic enough to debug. It's definitely theform_with model: @plog_post` line that is causing it, not the controller itself, but I've compared our routes.rb files against one another 100 times and I can't seem to find the error. Any help? Where's the plural magic inserting itself here?

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.