In this episode you'll learn how to add basic "flat" comments to a blog post. In future episodes, we'll show how to improve performance and nest comments replies. #rails #rubyonrails
Пікірлер: 16
@EnjoytheMents3 жыл бұрын
Nice! Your videos are on of the best. Thanks for taking the time to do them
@cjav_dev3 жыл бұрын
Thanks for watching!
@sosscs Жыл бұрын
what is the authenticity token you added in the form? what video did you explain it in, thanks
@cjav_dev Жыл бұрын
It's for preventing cross site request forgery: www.writesoftwarewell.com/how-rails-authenticity-tokens-protect-against-csrf/#:~:text=These%20cryptic%20values%20are%20called,time%20the%20session%20is%20regenerated.
@talhakhan44572 жыл бұрын
CJ, how can I add a key binding to vs code for the type html form skeleton that you have? Trust me I have tried my technical sophistication skills.
@merlin2049er2 жыл бұрын
I messed up somewhere. I'm using blog (for posts) & blog_comments (for comments), and my form action is but it's not finding it.
@swetadas40732 жыл бұрын
Hello sir.. I'm trying to create comment section in my app.. I have model named comment_post.. When I'm trying to save comment I'm getting following error param is missing or the value is empty: comment_post In the line second line of function def comment_post_params params. require(:comment_post). permit(:body) end I tried removing require(:comment_post) part.. But then my parameters are nil.. Can you please help me regarding this
@juancamiloforero1242 жыл бұрын
genial
@calebstevens82693 жыл бұрын
Why aren't you wrapping the post resources in the user like Resources user do Resources post End
@cjav_dev3 жыл бұрын
We could, but I prefer to keep the routes as shallow as possible and don’t feel like seeing the user and it’s ID in the path has any extra value, at least for this use case.
@calebstevens82693 жыл бұрын
@@cjav_dev could you do a video specifically on routes? They confuse me a lot. I thought you had to nest then to show ownership
@norverage65003 жыл бұрын
Would you be so kind and direct me how to delete these comments? Thanks
@cjav_dev3 жыл бұрын
Ah. So Comment.find(comment_id).destroy should work for an individual and Comment.destroy_all should delete all
@TohmanHD2 жыл бұрын
@@cjav_dev I don't get it, I don't know how could I make a delete button to a comment