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

推荐订阅源

J
Java Code Geeks
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
B
Blog
aimingoo的专栏
aimingoo的专栏
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
月光博客
月光博客
H
Help Net Security
V
Visual Studio Blog
量子位
A
About on SuperTechFans
博客园 - Franky
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | 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
This Week in Rails: hooks, fixtures, fetch_values, databa...
David Heinemeier Hansson · 2017-04-15 · via Ruby on Rails: Compress the complexity of modern web apps

Saturday, April 15, 2017
Posted by andatki

Hi there! This is Andy with another edition of This Week in Rails. This week we’re covering two weeks worth of changes, so let’s dive right in.

New

Hooks for action_controller_base and action_controller_api

This change breaks out two Action Controller hooks, where there was one before. action_controller_base and action_controller_api. These can be used to load less code at boot time.

Fixture accessor with no arguments

Do you need to load all the fixtures of a particular type? Calling a fixture accessor method with no arguments returns all fixtures.

Implement fetch_values for HashWithIndifferentAccess

Add fetch_values for HashWithIndifferentAccess in Rails, added to Ruby in 2.3.0. Support was added conditionally by using method_defined?.

Fixed

Clear active connections after initialization

If your app uses a lot of database connections, this one is worth a look. The author said that after deploying this change, they reduced their peak open database connection count by 13%.

Fix mistake in JS response parser

This change restores the ability to accept ecmascript for parsing. The author also declares that the JS response should not modify the DOM. Take a look!

Improved

Doc improvement for before_destroy

Did you know that before_destroy hooks should be set *before* dependent: destroy for it to work correctly? This documents that.

Don’t freeze input strings

Check this out if you’re curious about changes around frozen strings and usages of Immutable String (Matz said “All String literals are immutable (frozen) on Ruby 3”).

Whew! That covers just some of the changes in the first couple of weeks of April. Many other great pull requests are available to browse, from 27 contributors including 5 first-timers. Nice work!

Until next week!