IDK if you are still wondering how to solve this. I noticed that if you open your terminal, there's a part in which indicates the possible path in which you need to make the modifications. In my case, indicated me that it was admin/show_post. I divided my @post from show_post to two variables as follow: @post = Post.includes(:user).find(params[:id]) @comments = Post.find(params[:id]).comments.includes(%i[user rich_text_body]) After those changes in my admin_controller, I needed to change one line in the views: from: to: It was mostly try and error tbh
Thought I'd try something different with this video, I hope you like my Performance
Did I do an entire video just to make one pun? Maybe.
Easily one of the top webdev and especially RoR channels on the internet 👍
Thank you very much for taking the time out to post these very helpful videos..
God, i waited so much to see how you could face this super common problem but in rails7, thank you so much for all this knowledge.
Glad it was helpful 🙂
What a fantastic video! Rarely found neither on blogs or in other youtube videos! Really helpful!
Wow, that's very helpful thanks a lot! 🚀
Very helpful video, thanks!
this is some high quality content!
Appreciate the kind words haha!
At 9:43, you asked us to do our own show post fixes. I can't figure out how to fix it, checked your repo. Any right repo I can refer?
IDK if you are still wondering how to solve this. I noticed that if you open your terminal, there's a part in which indicates the possible path in which you need to make the modifications. In my case, indicated me that it was admin/show_post. I divided my @post from show_post to two variables as follow:
@post = Post.includes(:user).find(params[:id])
@comments = Post.find(params[:id]).comments.includes(%i[user rich_text_body])
After those changes in my admin_controller, I needed to change one line in the views:
from:
to:
It was mostly try and error tbh
In the admin controller:
def show_post
@post = Post.includes(:user, comments: [:user, :rich_text_body]).find(params[:id])
end
Rails 6 added insert_all, insert_all! and upsert_all methods do we still need import gem?
Bazaru net