Thank you for reading through the article, and providing me with this feedback. I have update the article with the answer to your question. I also included the answer below for easier reference
In step 7.5, copy-paste this snippet instead. This adds the line redirect_to root_path in the controller function increment_async so it goes to the homepage once the link is pressed.
classHomeController<ApplicationControllerdefindex@message="Dynamic"@posts=Post.allenddefincrement_async::IncrementCountWorker.perform_async(params[:post_id])redirect_toroot_path# THIS IS THE ADDED LINEendend
I grew up in Ann Arbor, Michigan but have been living in Austin, Texas for the better part of the past 10 years. I work as a "DevOps Engineer" and help organize DevOpsDays Austin.
Hi Tom,
Thank you for reading through the article, and providing me with this feedback. I have update the article with the answer to your question. I also included the answer below for easier reference
In step 7.5, copy-paste this snippet instead. This adds the line
redirect_to root_path
in the controller function increment_async so it goes to the homepage once the link is pressed.Excellent, thanks Raphael!