Intro To View Components In Ruby On Rails 7

preview_player
Показать описание
View Components allow you to create reusable, unit testable components that you can preview in the browser.

Join this channel to help support these videos:

Follow me on social media:

Join this channel to get access to perks:

Timestamps
0:00 View Component Demo
2:00 Installing View Components
2:40 Creating The Header Component
9:19 Testing The Header Component
15:36 Creating The Post Component
21:32 Testing The Post Component
26:10 Preview View Components In Browser

#Deanin #Software #Programming
Рекомендации по теме
Комментарии
Автор

View Components Rails + Tailwindcss == ❤❤❤

tomasvalent
Автор

Thank u! If you have any ideas on working with cryptocurrency, just payments aka wallet/bank app, transactions would also be very interesting!

antnbaranov
Автор

@Deanin super appreciate all you do for the community! Small correction due to changing libs... as of 2.67.0 you no longer need to include

2.67.0
Use ViewComponent::Base.config as the internal endpoint for config.

Simon Fish

Fix bug where #with_request_url, when used with query string, set the incorrect request.path and request.fullpath.

Franz Liedke

Add link to ViewComponentAttributes in Resources section of docs.

Romaric Pascal

render_preview test helper is available by default. It is no longer necessary to include

Joel Hawksley

tselle
Автор

I am back to rails after 10 years. Had some time with ruby and sinatra years ago. Now i'm doing a rails course on udemy and i like how rails developed from the good to the better. It's not the hyped thing anymore but it is a very well designed and documented tool that i really love to get to know again.

kittel-dev
Автор

thanks deanin! can you make a tutorails on invoices or reports to pdf?

pabloa
Автор

The last part of video when u use "include doesn't work in Rails 7.1.0 - Ruby 3.1.0 - gem "view_component", "~> 3.6".

Error:
`<class:PostComponentTest>': uninitialized constant (NameError)

ViewComponent 2.67.0 says:
"render_preview test helper is available by default. It is no longer necessary to include - Joel Hawksley.

Thanks! Good video tutorial about View Component in Ruby on Rails!

Mosiah
Автор

Hi @Deanin, great video. I need to componentize buttons with JS tooltips, but I need to reload them after rendering. Can I put the js inside the component? I'm using rails 7 with stimulus. I appreciate the help.

TheNorbdus
Автор

I liked this tutorial. Looking forward to more!!

davidcordero
Автор

i think you glance over the fact that you need to add `gem "view_component"` to your Gemfile.

tonypetruzzi