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

推荐订阅源

爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 【当耐特】
The Cloudflare Blog
B
Blog
Last Week in AI
Last Week in AI
小众软件
小众软件
量子位
S
SegmentFault 最新的问题
V
Visual Studio Blog
博客园 - 叶小钗
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享
A
About on SuperTechFans
雷峰网
雷峰网
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler

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
Finer-grained error pages and extended routes grepping
David Heinemeier Hansson · 2022-08-26 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, August 26, 2022
Posted by p8

Hi, this is Petrik with more Rails updates.

Use the error_highlight gem to locate the columns where an error was raised Ruby 3.1 added the error_highlight  gem to display the fine-grained location of where an error occurred. Rails will now use error_highlight on error pages to show the column range of where an error occurred.

Extend bin/rails routes –grep to also filter routes by matching against a path When looking at a path like /users/orhantoy/settings it’s not always obvious which controller action corresponds to this route. bin/rails routes –grep will now also match on a path.

$ bin/rails routes --grep /cats/1
Prefix Verb URI Pattern Controller#Action
   cat GET /cats/:id(.:format) cats#show
       PATCH /cats/:id(.:format) cats#update
       PUT /cats/:id(.:format) cats#update
       DELETE /cats/:id(.:format) cats#destroy

Do not return CSP headers for 304 Not Modified responses

After the fix for CVE-2022-22577, Rails sends CSP headers for every response, even if the response contains no HTML. However, when we return a 304 Not Modified without any HTML, browsers will update the CSP header, but otherwise reuse the cached HTML. If that HTML contains a script tag with a nonce, this nonce may no longer match a new nonce from the CSP header. This has been fixed by not returning the CSP headers for 304s.

Normalize virtual attributes on ActiveRecord::Persistence#becomes

When source and target classes have different attributes, becomes will now adapt attributes such that the extra attributes from the target class are added.

We had 24 contributors since last week. 

That’s it for this week!