Adding a Blog Post Destroy Action and Refactoring Discussion
Does asdf support ruby > 3.2.0 on Mac Ventura 13.1?
Yes, it supports all Ruby versions because it uses ruby-build underneath.
Hey there!
Amazing videos, thanks so contributing.
one thing to better is if you zoom in on code for the next videos it would great
For those wondering why the popup didn't show up, you can add this at the top of index.html.erb:
<%= javascript_include_tag "turbo", type: "module" %>
At least that's how I solved it following previous tutorial ๐
Thank you, this issue may be due to changes since Rails 7.0 that the tutorial uses. I am using Rails 8 and I had this issue.
As a JS dev I was following along the route creation and thinking "Well, that is really easy". Then the refactor completely blew my mind. ๐ I think I am going to really like this Rails thing...
Really enjoying these tutorials (once I found a good screen layout so I could read the code in the video properly), and got organised with a quick way to pause the video so I could keep up.
One suggestion... I'd have loved to have tests in place prior to refactoring the routes and controller :)
After adding the "before_action :set_blog_post except: [ :index, :new, :create ]", and removing the "@blog_post = BlogPost.find(params[:id])", the app started to redirect to index when using the show and edit methods.
Started GET "/blog_posts/3" for 127.0.0.1 at 2025-02-22 11:05:23 -0300
Processing by BlogPostsController#show as HTML
Parameters: {"id" => "3"}
Redirected to http://127.0.0.1:3000/
Filter chain halted as :set_blog_post rendered or redirected
I'm using Rails 8 with WSL, because I could not change Rails version.