RMazoni

Joined

4,010 Experience
40 Lessons Completed
0 Questions Solved

Activity

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.