Tap to unmute

Add Comments with Ruby on Rails

  Рет қаралды 5,466

CJ Avilla (cjav_dev)

CJ Avilla (cjav_dev)

Күн бұрын

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
@EnjoytheMents
@EnjoytheMents 3 жыл бұрын
Nice! Your videos are on of the best. Thanks for taking the time to do them
@cjav_dev
@cjav_dev 3 жыл бұрын
Thanks for watching!
@sosscs
@sosscs Жыл бұрын
what is the authenticity token you added in the form? what video did you explain it in, thanks
@cjav_dev
@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.
@talhakhan4457
@talhakhan4457 2 жыл бұрын
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.
@merlin2049er
@merlin2049er 2 жыл бұрын
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.
@swetadas4073
@swetadas4073 2 жыл бұрын
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
@juancamiloforero124
@juancamiloforero124 2 жыл бұрын
genial
@calebstevens8269
@calebstevens8269 3 жыл бұрын
Why aren't you wrapping the post resources in the user like Resources user do Resources post End
@cjav_dev
@cjav_dev 3 жыл бұрын
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.
@calebstevens8269
@calebstevens8269 3 жыл бұрын
@@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
@norverage6500
@norverage6500 3 жыл бұрын
Would you be so kind and direct me how to delete these comments? Thanks
@cjav_dev
@cjav_dev 3 жыл бұрын
Ah. So Comment.find(comment_id).destroy should work for an individual and Comment.destroy_all should delete all
@TohmanHD
@TohmanHD 2 жыл бұрын
@@cjav_dev I don't get it, I don't know how could I make a delete button to a comment
Nested Comments with Ruby on Rails
19:46
CJ Avilla (cjav_dev)
Рет қаралды 3,6 М.
Like button with Ruby on Rails
17:57
CJ Avilla (cjav_dev)
Рет қаралды 6 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Realtime partial page updates with Turbo Streams
22:33
CJ Avilla (cjav_dev)
Рет қаралды 9 М.
Has many through associations in Ruby on Rails
15:21
CJ Avilla (cjav_dev)
Рет қаралды 4,7 М.
Polymorphic associations with Ruby on Rails - like all the things
20:54
CJ Avilla (cjav_dev)
Рет қаралды 6 М.
Rails scaffold deepdive
53:50
CJ Avilla (cjav_dev)
Рет қаралды 5 М.
Debugging An Undebuggable App
18:25
Bryce Bostwick
Рет қаралды 215 М.
Ruby on Rails #58 Nested Resources
17:58
SupeRails
Рет қаралды 4,4 М.
Rspec request specs for an API Controller with Rails
13:32
CJ Avilla (cjav_dev)
Рет қаралды 10 М.
What if all the world's biggest problems have the same solution?
24:52
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 54 М.
Blocks, Procs, and Lambda Functions in Ruby
12:08
Deanin
Рет қаралды 5 М.