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

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
阮一峰的网络日志
阮一峰的网络日志
The Cloudflare Blog
J
Java Code Geeks
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
B
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
ErrorReporter#unexpected, with_routing test helpers and m...
David Heinemeier Hansson · 2023-11-24 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, November 24, 2023
Posted by vipulnsward

Happy Thanksgiving weekend everyone! This is Vipul bringing you the latest from this week’s changes in the Rails codebase.

ErrorReporter#unexpected to report in production but raise in development
This change adds ErrorReported#unexpected to report precondition violations.

For example:

  def edit
    if published?
      Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible")
        return false
    end
      # ...
  end

The above will raise an error in development and test, but only report the error in production.

Make with_routing test helper work for integration tests
with_routing test helper support has now been added to ActionDispatch::IntegrationTest to allow usage in integration tests.

Support nested elements inside button tag in Active Storage uploads
This change addresses a potential issue that could arise when a button or an input of type submit contains child elements, such as spans, icons, or other HTML elements.

Remove deprecations
This PR is an ongoing effort to remove all deprecated code, marked as deprecated for Rails 7.2. Checkout the PR for all things going away and if you are handling them already!

Handle case in MySQL where the ActiveRecord.db_warnings_action is not called even when a DB query has warnings
This change handles cases where MySQL returns warning_count greater than zero, but returns no warnings when the SHOW WARNINGS query is executed, ActiveRecord.db_warnings_action proc will still be called with a generic warning message rather than silently ignoring the warning(s).

Delay validation of registered Active Record adapters and allow aliasing of adapters
This change is from an ongoing effort to allow aliasing of DB adapters by name. The end state here is to allow mysql to be mapped to either trilogy or mysql2 at an application level.

Fix ActiveStorage::Representations::ProxyController not returning the proper preview image variant for previewable files.

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

Until next time!

Subscribe to get these updates mailed to you.