-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
layout: post | ||
title: "Deferred routes drawing, connect route helper and more" | ||
categories: news | ||
author: Wojtek | ||
og_image: assets/images/this-week-in-rails.png | ||
published: true | ||
date: 2024-08-16 | ||
--- | ||
|
||
Hi, [Wojtek](https://x.com/morgoth85) from this side. Let's explore this week's changes in the Rails codebase. | ||
|
||
[Defer route drawing](https://github.com/rails/rails/pull/52353) | ||
This change triggers the initial reload of routes either through middleware or when a *url_helpers* method is used. | ||
Previously, this was executed unconditionally on boot, which could slow down boot time unnecessarily for larger apps with lots of routes. | ||
Environments like production that have `config.eager_load = true` will continue to eagerly load routes on boot. | ||
|
||
[Add connect route helper](https://github.com/rails/rails/pull/52169) | ||
Defines a route that recognizes HTTP CONNECT (and GET) requests. | ||
More specifically this recognizes HTTP/1 protocol upgrade requests and HTTP/2 CONNECT requests with the protocol pseudo header. | ||
|
||
[Bulk insert fixtures on SQLite](https://github.com/rails/rails/pull/52562) | ||
Previously one insert command was executed for each fixture, now they are aggregated in a single bulk insert command. | ||
|
||
[Update PostgreSQL adapter extensions to include schema name](https://github.com/rails/rails/pull/52313) | ||
The schema dumper will now include the schema name in generated `enable_extension` statements if they differ from the current schema. | ||
|
||
[Add escape_html_entities option to JSON encoder](https://github.com/rails/rails/pull/51272) | ||
This allows for overriding the global configuration found at `ActiveSupport.escape_html_entities_in_json` for specific calls to `to_json`. | ||
This can be used from controllers in the following manner: | ||
```ruby | ||
class MyController < ApplicationController | ||
def index | ||
render json: { hello: "world" }, escape_html_entities: false | ||
end | ||
end | ||
``` | ||
|
||
[Remove racc gem dependency](https://github.com/rails/rails/pull/52610) | ||
`ActionDispatch::Journey::Parser` does not need to be generated by *racc*. This will open the possibility to optimize it in the future. | ||
|
||
[Support minitest 5.25+](https://github.com/rails/rails/pull/52609) | ||
Minitest 5.25 changed the signature of one of the internal methods that was used by Rails. | ||
|
||
[Enable query log tags by default on development env](https://github.com/rails/rails/pull/51342) | ||
This can be used to trace troublesome SQL statements back to the application code that generated these statements. | ||
It is also useful when using multiple databases because the query logs can identify which database is being used. | ||
|
||
[Fix returning type from encrypted attribute](https://github.com/rails/rails/pull/52247) | ||
Previously it always returned *:text* type. | ||
|
||
[Raise when using key which can't respond to #to_sym in encrypted configuration](https://github.com/rails/rails/pull/51950) | ||
As is the case when trying to use an Integer or Float as a key, which is unsupported. | ||
|
||
_You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2024-08-09%7D...main@%7B2024-08-16%7D)._ | ||
_We had [31 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20240809-20240816) to the Rails codebase this past week!_ | ||
|
||
Until next time! | ||
|
||
_[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you._ |