惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
G
Google Developers Blog
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
博客园 - 聂微东
V
Visual Studio Blog
博客园_首页
D
DataBreaches.Net
腾讯CDC
I
InfoQ
F
Fortinet All Blogs
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
月光博客
月光博客
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
C
Check Point Blog

Ruby on Rails: Compress the complexity of modern web apps

Safer to_i coercion, custom to_fs formats, and more! This Week in Rails: May 16, 2026 This Week in Rails: May 8, 2026 This Week in Rails: May 1, 2026 Active Record gets better every week Great big Rails World 2026 update: CFP, Corporate Support tickets, workshops Query command for database queries and more Explicit query: and body: kwargs for integration tests and more! Speedup ActiveRecord::LogSubscriber#sql_color and more! This Week in Rails: March 27, 2026 Rails Versions 8.0.5 and 8.1.3 have been released! Rails Versions 7.2.3.1, 8.0.4.1, and 8.1.2.1 have been released! This Week in Rails: March 20, 2026 Validate URI scheme in Action Text and more This Week in Rails: March 6, 2026 Planning Center is the newest Rails Foundation Contributing member Action Text gets Markdown conversion, editor links in devcontainers, and more! BARRA seeks Rails developer Joe Agliozzo is looking for a Rails developer The rise of lighttpd as the alternative web server When longer is better and more is more Snowdevil: First e-tailer on Rails Natural selection for frameworks in Ruby vs Java Address book tutorial in Portuguese Becoming a better programmer with Rails 10 Things Every Java Programmer Should Know About Ruby Really Getting Started in Rails Off the Treadmill, Onto the Rails Rails 0.9.5: A world of fixes and tweaks Rich clients with Rails and XUL
Improved PostgreSQL support, performance improvements and...
David Heinemeier Hansson · 2022-07-04 · via Ruby on Rails: Compress the complexity of modern web apps

Hi, this is Petrik, bringing you the latest news from the Rails world.

Optimize Active Record batching

Instead of specifying a long list of ids for batch queries (WHERE IN (…ids…)), Active Record will iterate in ranges (WHERE id >= num1 AND id < num2).

Add validity for PostgreSQL indexes

When creating indexes with CONCURRENTLY, you could to end up with an invalid index. You can now ask an index if it’s valid.

Add support for PostgreSQL exclusion constraints
This extends Active Record’s migration/schema dumping to support PostgreSQL exclusion constraints.

Add :force support to ActiveSupport::Cache::Store#fetch_multi
Setting force: true forces a cache “miss,” meaning we treat the cached values as missing even if present. #fetch_multi  now supports all of the #fetch options.

Avoid validating a unique field if it has not changed and is backed by a unique index

Previously, when saving a record, Active Record would perform an extra query to check for the uniqueness of each attribute having a uniqueness validation, even if that attribute hadn’t changed.

If the database has the corresponding unique index, then this validation can never fail for persisted records, and we can safely skip it.

Make Notifications::Fanout faster and safe
This changes aims to improve ActiveSupport::Notifications::Fanout. It should make subscribing/unsubscribing to in-flight topics safer. It is also significantly faster for all cases, except for evented.

Strings returned from strip_tags are correctly tagged html_safe?

As the strings returned from strip_tags contain no HTML elements and the basic entities are escaped, they are safe to be included as-is as PCDATA in HTML content. Tagging them as html-safe avoids double-escaping entities when being concatenated to a SafeBuffer during rendering.

Correctly check if frameworks are disabled when running app:update

When creating a new Rails application you can use the –skip-* options to disable frameworks. After upgrading to a new version to Rails you can update all configurations by running bin/rails app:update. This change makes sure the disabled frameworks remain disabled after upgrading.

Enable connection pooling by default for MemCacheStore and RedisCacheStore

Cache stores can enable connection pooling using a single pool option. This option will default to true now for MemCacheStore and RedisCacheStore.

Add :urlsafe option to MessageVerifier and MessageEncryptor constructors

The MessageVerifier and MessageEncryptor constructors now accept a :urlsafe option. When enabled, this option ensures that messages use a URL-safe encoding.

Support calling in_batches with descending order without a block

All batching methods can be called with a descending order. This change adds that ability to in_batches when called without a block.

Allow db:prepare to load the schema if the database already exists but is empty

Previously, if the database exists but has not been populated with tables, db:prepare would run all migrations.
Now db:prepare will load the schema, then run any remaining migrations, to bring the database up to state.

Since last time, 84 people contributed to Rails. As usual, there are too many changes to cover them all, but you can check out all of them here. Until next time!