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

推荐订阅源

美团技术团队
T
The Blog of Author Tim Ferriss
C
Check Point Blog
博客园_首页
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
L
LangChain Blog
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
爱范儿
爱范儿
Vercel News
Vercel News
博客园 - Franky
V
V2EX
IT之家
IT之家
U
Unit 42
N
Netflix TechBlog - Medium
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
博客园 - 叶小钗
H
Help Net Security
V
Visual Studio Blog
GbyAI
GbyAI

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
An endpoint for uptime monitors, an improved help command...
David Heinemeier Hansson · 2023-01-13 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, January 13, 2023
Posted by Emmanuel Hayford

Halløj. It’s me again, bringing you the usual goodies from Rails.

Show relevant commands when calling help This pull request improves the user experience by displaying the appropriate commands for the context in which the user is running rails -h or rails. When outside of a Rails application, the output will be the options for the rails new command. When inside a Rails application, the common Rails commands will be displayed. This eliminates confusion for users who may have expected to see different commands in different contexts.

Let HWIA#transform_keys take a Hash argument like Ruby’s Hash#transform_keys The HashWithIndifferentAccess#transform_keys method now mirrors the functionality of Ruby’s Hash#transform_keys method by accepting a Hash argument.

Let delegate define method with proper arity when delegating to a class This change improves the delegate method by ensuring that the method being defined has the proper arity when delegating to a class. As a result, the defined method is significantly faster - up to 3.5 times faster when there are no arguments. However, it should be noted that in order to take advantage of this performance improvement, the target method being delegated to must be defined prior to declaring the delegation.

Add a default health controller This pull request introduces a new endpoint for load balancers and uptime monitors by adding a Rails::HealthController#show method and mapping it to the “/up” path in newly generated Rails applications. With this new endpoint, Load balancers and uptime monitors can easily track whether or not an app is up. 

If, however, you need to monitor database, Redis or internal network connections to microservices that your application relies on, you will need to implement monitoring yourself.

Run test:prepare before bin/rails test commands This pull request streamlines the process of running all tests in a CI environment by making bin/rails test equivalent to bin/rake test when it comes to preparing tests. This means that running bin/rails test alone will now run all the tests, eliminating the need for the additional bin/rake test command.

However, it’s important to note that by default, running bin/rails test alone will not include system tests as they are generally slower. To include system tests as well, you can add an additional step to your CI pipeline that runs bin/rails test:system, or you can change your first step to bin/rails test:all which runs all the tests including the system tests.

Change dockerfile from using Node 19 to match dev environment This pull request improves the generated Dockerfile by installing the locally installed versions of Node and Yarn, decoupling the installation of libvips from Node, and adding the installation of node_modules by running yarn.

We had 33 contributors to Rails this week.

See you in the next issue!

Subscribe to get these updates mailed to you.