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

推荐订阅源

G
Google Developers Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
博客园 - 聂微东
M
MIT News - Artificial intelligence
博客园_首页
Jina AI
Jina AI
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Vercel News
Vercel News
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
B
Blog
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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
Security improvements, reducing bytes and more!
David Heinemeier Hansson · 2022-03-27 · via Ruby on Rails: Compress the complexity of modern web apps

Sunday, March 27, 2022
Posted by p8

Hi, this is Petrik, bringing you the latest news from the Rails world.

Reduce the output of Rails::Railtie#inspect to the classname
Anytime inspect was called on Rails::Application, it would output the very large application object. By reducing it to the classname, we also prevent leaking credentials.

Remove body content from redirect responses

Modern browsers don’t render the body content for redirects. The delivered bytes are therefore a small waste.

Return the blob/blobs when #attach is able to save the record

Saving attachments to a record with the attach method returns the blob or array of blobs that were attached to the record.

Support password challenge via has_secure_password

This allows a password challenge to be implemented with the same ease as a password confirmation, re-using the same error handling logic in the view, as well as the controller.

Generate Content Security Policy headers for non-HTML responses

The content security policy DSL would not generate headers for non-HTML responses, even if a configuration is explicitly provided. However, for example, Mozilla Observatory recommends adding it for API responses as well.

Extend audio_tag and video_tag to accept Active Storage attachments

Now it’s possible to write video_tag(user.video_file) instead of video_tag(polymorphic_path(user.video_file)).

Add active_record.destroy_association_async_batch_size configuration

This allows applications to specify the maximum number of records that will be destroyed in a single background job by the dependent: :destroy_async association option. If the number of dependent records is greater than this configuration, the records will be destroyed in multiple background jobs.

Auto-create user and grant privileges when creating mysql databases
Creating the database user and granting privileges every time you need to set up Rails locally on a new computer can be tedious. This change adds it to the MySQL build rake task, using the root user with no password.

Since last time, 36 people contributed to Rails. As usual, there’s too much changes to cover them but you can check out all of these here. Until next time!