Hello, zzak again with the latest changes in Rails this week!
In this YouTube, DHH goes through the latest changes planned for Rails 7 and how the face of front-end development has evolved.
A reminder to upgrade to the latest stable versions of Rails which includes a critical security fix for Action Pack.
There’s an ongoing epic to delete the classic autoloader that started months ago. Let’s do a checkpoint in this newsletter.
You can no longer opt-in to classic mode using config.autoloader=, this setter has been deleted, Rails 7 has only one autoloading backend: Zeitwerk.
During application initialization, you can autoload classes and modules from config.autoload_once_paths, but autoloading reloadable constants doesn’t work anymore. That has been deprecated and issuing warnings since Rails 6.0. Check the documentation for valid ways to do that.
Additionally, a lot of private APIs and orphan code fall in cascade. Check for example #43048 and #43058, and there’s more to come.
This PR adds a helper for weekday select which even includes i18n!
This PR allows serving uploads in chunks in order to stream buffered files as is required e.g. audio podcasts from S3 to an iphone.
In a multidb configuration you may have a database that you want to connect to, such as a replica, but don’t want to accidentally run any db tasks on it.
The “database_task: false” config flag ensures you don’t accidentally “rails db:drop” your backup database.
“Don’t have to keep all the monuments to old skirmishes around forever.”
Since puma is the only option available for the web server, it doesn’t make sense to allow removing it as a configuration option.
15 people contributed to Rails since last time. All the changes can be checked here. Until next week!