Chris Oliver

Joined

291,060 Experience
86 Lessons Completed
299 Questions Solved

Activity

Posted in Testing API Integrations with WebMock Discussion

💖💖💖💖

You can. Check out the ActiveStorage guide for variants.

This should be fixed!

We will have more available soon. 👍

Some of the advanced ones later on will be paid but most will be free.

Advice from the author himself! Thanks Domizio!

Posted in Setup Ubuntu 22.10 Kinetic Kudu Discussion

We recommend ASDF instead because it supports other programming languages, like Ruby, Node.js, Python, etc. This is important because Rails applications will often need Node as their JavaScript gets more complicated.

It also uses .ruby-version and .node-version files just like the other language managers.

Plus, it's simpler than RVM the which requires a deeper shell integration.

Posted in Custom Turbo Stream Actions Discussion

You sure can do that. I would have each file register the function itself and all you'd need to is require those files.

Disabling Turbo is the right solution for any oauth links that redirect externally.

Posted in Active Storage replace attached from a variant

Just re-assign it to the variant?

record.update(image: record.image.variant(...))

A flash message is set for the next full HTTP request. A turbo stream response is only a partial update to the existing page, so you would need to add a turbo stream to inject a flash message if you wanted to keep that.

Posted in Rails Initialization Internals Discussion

You're welcome and thanks for watching! Hope it helps you solve problems in the future. 👍

Posted in Rails Initialization Internals Discussion

Excellent! That stuff has always been poorly documented, so I'm glad we could help!

Posted in Rails Initialization Internals Discussion

Glad you enjoyed it Michael! We will have to do more episodes like this. 💪

Posted in Rails Initialization Internals Discussion

I get irrationally excited when I learn how Rails or other gems work internally. Love the feeling when something feels like a mystery and then you realize it's actually really straightforward when you see how it works. ❤️

Posted in Rails Initialization Internals Discussion

I have done this in a few previous episodes (can't remember which ones) so you'll have to see if you can find those. We will definitely cover more stuff like this in the future!

Posted in Pass variable to Flash object

You can use html_safe on the notice message to allow them to include HTML.

redirect_to some_path, notice: "<div data-controller=\"autohide\">Some message</div>"

Glad you liked it Ahmed!

Glad you're enjoying it. We'll keep doing more Hotwire stuff!

They sure do and we will absolutely cover more ideas for them. Next episode is going to walk through using them to implement browser notifications. 👍

Yep! I think a Stimulus controller for remove probably makes the most sense, however this was a great example to show off a small custom Turbo Stream.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.