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

推荐订阅源

T
The Blog of Author Tim Ferriss
IT之家
IT之家
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
C
Check Point Blog
T
Tailwind CSS Blog
博客园 - Franky
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
博客园 - 叶小钗
J
Java Code Geeks
腾讯CDC
罗磊的独立博客
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
B
Blog
V
Visual Studio Blog
F
Fortinet All Blogs

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
A much needed Active Storage documentation with a new opt...
David Heinemeier Hansson · 2023-07-23 · via Ruby on Rails: Compress the complexity of modern web apps

Sunday, July 23, 2023
Posted by Emmanuel Hayford

This is Emmanuel… you haven’t heard from me in a while. I’m doing great, and have a few merged pull requests that I want to share with you.

Don’t show secrets for MessageVerifier#inspect and KeyGenerator#inspect If anyone calls a cipher in the console, it will reveal the secret of the encryptor. By overriding the inspect method to display only the class name, we can prevent accidental exposure of sensitive information.

Active Record commit transaction on return, break and throw There’s a lot of history around this PR. In short Rails 7.1 will get a new configuration option that defines whether return , break and throw inside a transaction block cause the transaction to be committed or rolled back. Let’s take this example:

Model.transaction do
  model.save
  return
  other_model.save
end

With the new config.active_record.commit_transaction_on_non_local_return set to false , this transaction will rollback upon hitting return, if set to true , the transaction will be committed.

Document common ActiveStorage issues When attaching files to a has_many_attached association, the default behaviour is to replace any existing attachments. However, if you wish to preserve existing attachments and add new ones, you can achieve this by setting Rails.application.config.replace_on_assign_to_many to false. This PR properly documents this behaviour.

Specify when to generate has_secure_token Rails has a has_secure_token method that employs SecureRandom::base58 to generate a 24-character unique token for a model. With this PR, one can specify at what point during the model’s life-cycle the token is generated via an on: option. This PR ensures we can do something like:

class User < ApplicationRecord
  has_secure_token on: :initialize
end

By passing the on: :initialize , the token is generated in an after_initialize callback as opposed a before_* callback which is the default behaviour.

In the last fourteen days, we’ve had 37 generous contributors.

That’s all I’ve got for today!

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

Subscribe to get these updates mailed to you.