Ruby on Rails | rubyclub
1.53K subscribers
215 photos
1 video
265 links
Software Writer @yegorckv
Download Telegram
DHH about Rails 8

The primary mission for my contributions toward Rails 8 is now crystal clear: PWA. We can extract all the finickiness around web push notifications, for example, and make it trivially easy to use.
Enqueue Multiple Jobs Together with perform_all_later in Rails

Are you still looping over the list of jobs to enqueue them individually? This post explores the new perform_all_later method in Rails, which was introduced in Rails 7.1 and lets you enqueue multiple jobs together to reduce the round-trip to the job backend, like Redis or the database.
Digging into Turbo 8's Morphing Feature in Ruby on Rails

The gist of the blog post and talk is that Turbo frames and streams are useful but often cumbersome to integrate since they are highly focused containers of logic.

They won’t be going away but might be more of a _special-use_ tool coming up with the introduction of morphing which could be a more convenient and useful “default” much like the standard full-page reloads of historical Rails apps.
DHH about Rails 8

Rails 8 is slated for a 2024 release. This milestone will gather some of the intentions on what it'll include.

💻 https://github.com/rails/rails/milestone/87
Please open Telegram to view this post
VIEW IN TELEGRAM
Just like image_tag, audio_tag and video_tag can now accept Active Storage attachments. From Rails 7.1 they can generate audio and video tags when passed an attachment without the need to call polymorphic_path.
Daily Log code deep dive - Strada

The second video in a series diving into the code of Daily Log, an open source Ruby on Rails and Turbo Native app.

This video focuses on building native Swift components with Strada. I cover how to wire up a native button powered by HTML and a Stimulus controller.

📺 View on YouTube
Please open Telegram to view this post
VIEW IN TELEGRAM
Here's what's coming in Rails 8

Work on Rails 8 is starting, so I dug through the official GitHub milestone to break down all the upcoming goodies for you. There's plenty coming, including Solid Queue, Solid Cache and Kamal becoming defaults, better support for PWAs, an official LSP, and more!

Read more →
8 Turbo 8 "Gotchas"

As the final release of Turbo 8 nears, there are a few “gotchas” worth knowing about that will make life easier as you start updating existing Rails Turbo apps to take advantage of all the new features that Turbo 8 offers, like page morphs

fly.io/ruby-dispatch
Please open Telegram to view this post
VIEW IN TELEGRAM
💻 This Week in Rails is out! Among the updates:

- the default number of threads in Puma config has now been updated from 5 to 3
- Object#with block support added
- 'explain' support for methods like last, pluck and count
Check it all out here:

❤️ this-week-in-rails
Please open Telegram to view this post
VIEW IN TELEGRAM
Rails 7.1.3 has been released

https://rubyonrails.org/2024/1/16/Rails-7-1-3-has-been-released

Action Mailer has a new method to deliver enqueued jobs: deliver_enqueued_emails. It works with and w/out a block. With a block, it delivers all emails within the block. It also accepts a 'queue' option, which delivers the emails held in 'queue'.
A frequently employed pattern in Ruby, particularly in testing scenarios, involves preserving the current value of an attribute, assigning a new value, and subsequently restoring the original value within an ensure clause. Rails 7.1 introduced the 'with' method to help.
How to Add Live Reload to Your Rails Application

Live reload is an incredible tool for developers looking to boost their productivity. In this tutorial, I will walk you through the process of implementing live reload in your Ruby on Rails application using esbuild.

📺 View on YouTube
Please open Telegram to view this post
VIEW IN TELEGRAM
How to deal with PostgreSQL Backups using Kamal

What is Kamal
Developed by 37signals (creators of Ruby on Rails, Basecamp and Hey), Kamal is a modern evolution of Capistrano for the world of containerised applications.

In addition to its hassle-free deployment on servers, whether virtual machines or bare metal, Kamal is known for its zero downtime deployments and rolling restarts. This ensures continuous service availability.
👩‍💻 How to test Ruby on Rails applications using RubyMine

Dive into the world of testing with us in this guide on working with tests in RubyMine. Whether you're a seasoned developer or just starting, we've got you covered!

📺 All RubyMine videos
Please open Telegram to view this post
VIEW IN TELEGRAM
New documentation PR is up for community review. If you have experience with the perform_all_later method in #ActiveJob, please take a look: 💻 GitHub

Documentation update from the Rails Foundation: The team is assembled and the work has started. Meet the team, read how we work, and learn how you can help get the Rails docs in the best possible shape: Documentation update

#RailsTip: With #Zeitwerk as the default autoloader, the recommended way to create custom root namespaces is by pushing directories to the main autoloader.
Assuming you want to have app/services under the Services namespace.
Please open Telegram to view this post
VIEW IN TELEGRAM
Turbo 8 released

Turbo 8 introduces morphing for smooth page refreshes, view transitions, InstantClick, and more.

👩‍💻 dev.37signals
Please open Telegram to view this post
VIEW IN TELEGRAM
Build A Music Streaming App Like Soundcloud! with Ruby on Rails

Hey everyone and welcome back to the channel in this video I am showing you how to build a music streaming app like Soundcloud using Ruby on Rails, this includes the Users, Posts, and Image/Cover Art file attachments then previewing them to look pretty on the page!

📺 Tutorial
Please open Telegram to view this post
VIEW IN TELEGRAM
Rails 7.1 has a new capture_emails test helper that captures and returns all emails sent within the given block. This helper simplifies the common pattern used in Rails tests with assert_emails.
📺 Turbo 8 and Turbo Native

Turbo 8 works out of the box with Turbo Native, on both iOS and Android

But there's a big gotcha. The latest releases of Turbo iOS and Turbo Android show a very noticeable flicker when changes are broadcasted.

Lucky for us there are already PRs to fix the issues on both platforms. So I put together an 8 minute video showing how to fix the issue in your Turbo Native apps.
Please open Telegram to view this post
VIEW IN TELEGRAM