This Week in Rails

September 27, 2024

Rails 8 beta, DHH keynote, fresh error pages, and more!

Hi, it's zzak. Let's jump into This Week in Rails!

Rails 8.0 beta 1 has been released!
The first beta of Rails 8 is out! While the release notes are getting ready, have a look at the changes and give it a go.

DHH keynote from Rails World
The first talk recording from Rails World is up, and David goes over everything that went into Rails 8 and beyond.

Tidy up the error pages
The error pages built into Rails have been updated, here's a preview of the new look:

Drop support to Ruby 3.1
Rails 8 will require Ruby 3.2.0 or newer.

Add TaggedLogging#logger constructor for more pleasant logging interface
This updates the default logger in production to use ActiveSupport::TaggedLogging.logger(STDOUT).

Make Active Model Serialization "read_attribute_for_serialization" public
Since this method was already mentioned in the public documentation, the team decided it's worth making it public and document the behavior.

Set error code to 1 if generator could not be found
This change updates the exit code when running bin/rails generate with an invalid generator.
# Before
bin/rails generate does_not_exist
echo $?
0

# After
bin/rails generate does_not_exist
echo $?
1

Update generated application.css with Propshaft
Now that Propshaft is the only asset pipeline, we no longer need these = require directives in the generated application.css file.

Revert inferring inverse_of for Delegated types
Automatically inferring :inverse_of is incompatible with records that do not declare inverse associations.
The team decided to revert this change to unblock the release of Rails 8.

You can view the whole list of changes here. We had 27 contributors to the Rails codebase this past week!

Until next time!

About This Week in Rails

Your weekly inside scoop of interesting commits, pull requests and more from Rails.