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

推荐订阅源

IT之家
IT之家
腾讯CDC
博客园 - Franky
S
SegmentFault 最新的问题
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
Y
Y Combinator Blog
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
I
InfoQ
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed
博客园 - 叶小钗
博客园_首页
有赞技术团队
有赞技术团队
雷峰网
雷峰网
量子位
小众软件
小众软件
月光博客
月光博客
U
Unit 42
D
DataBreaches.Net

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
Action Mailer bug report template, Active Storage fixes a...
David Heinemeier Hansson · 2023-11-17 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, November 17, 2023
Posted by Greg Molnar

Hi, it’s Greg. Let’s explore this week’s changes in the Rails codebase.

Fix word_wrap with empty string
This pull request fixes word_wrap to return an empty string instead of nil when given an empty string.

Process preview variant when processing preview
This pull request updates ActiveStorage::Preview#processed to generate both the full-sized preview image and the requested variant. For example, attached_pdf.preview(:thumb).processed will now immediately generate the full-sized preview image and the :thumb variant of it. Previously, the :thumb variant would not be generated until a further call to e.g. processed.url.

Fix TransformJob not accepting previewables
The ActiveStorage::TransformJob is being used when an attachment has predefined variants with the preprocessed option. When you upload a file which is not an image but a previewable file like a pdf-document it failed with ActiveStorage::InvariableError. This pull request fixes that by determining if a blob is capable of being previewed. If so, a preview will be generated.

Add Action Mailer bug report template
This pull request introduces Action Mailer bug report templates for contributors to reproduce issues with failing ActionMailer::TestCase instances.

Make return value of Cache::Store#write consistent

The return value of Cache::Store#write was not specified before, and varied between backends. This pull request makes it consistent:

  • true indicates a successful write
  • nil indicates an error talking to the cache backend
  • false indicates a write that failed for another reason

This helps to distinguish the case where the key already exists from the case where there was a memcached (or Redis) error.

You can view the whole list of changes here.
We had 25 contributors to the Rails codebase this past week!

Until next time!

Subscribe to get these updates mailed to you.