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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 【当耐特】
A
About on SuperTechFans
Last Week in AI
Last Week in AI
雷峰网
雷峰网
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
Recent Announcements
Recent Announcements

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
This Year in Rails, a summary of 2022!
David Heinemeier Hansson · 2022-12-30 · via Ruby on Rails: Compress the complexity of modern web apps

Friday, December 30, 2022
Posted by gregmolnar

Hey!

This is Emmanuel, Greg and Wojciech, bringing you the summary of what happened with Rails in the past year. It was a busy year with 3131 commits from 491 contributors and 31 releases! We carefully selected the most significant pull requests for inclusion, but it is possible that we may have overlooked some due to the need to keep the newsletter concise. That said, Emmanuel is compiling a comprehensive list of pull requests for Rails this year.

Introducing: The Rails Foundation In case you missed it, with eight founding members, Rails has started The Rails Foundation! Together, the founding members have contributed a total sum of $1,000,000 that will aid the foundation’s mission to improve the documentation, education, marketing, and events in our ecosystem. More here.

Stimulus gets an Outlets API Around Hotwire, this pull request received a warm welcome. I reached out to the author, Marco Roth, who whipped out a documentation that perfectly summarises the Outlet API:

The Outlets API lets you reference Stimulus Controller instances and their controller element from within another Stimulus Controller by using CSS selectors. The use of Outlets helps with cross-controller communication and coordination as an alternative to dispatching custom events on controller elements.

Allow setting YAML serialization options on a per-attribute basis This pull request adds functionality to allow setting YAML serialization options on a per-attribute basis - along with the current application-wide setting.

Docked Rails CLI Setting up Rails for the first time with all the dependencies necessary can be daunting for beginners. Docked Rails CLI uses a Docker image to make it much easier, requiring only Docker to be installed.

Add default Dockerfiles This pull request adds Docker files by default to new apps: Dockerfile, .dockerignore, bin/docker-entrypoint. These files can be skipped with –skip-docker. They’re intended as a starting point for a production deploy of the application. Not intended for development (use the above mentioned Docked Rails for that). You can see more details about using it on the pull request.

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.

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.

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.

Stop autoclosing of PRs While the idea of cleaning up the pull request list by nudging reviewers with the stale message and closing pull requests that didn’t got a review in time could work for the maintainers, in practice it discourages contributors to submit contributions.

Add –name option to the app generator The option –name will override the application name to be different from the folder name.

Avoid validating a unique field if it has not changed and is backed by a unique index

Previously, when saving a record, Active Record would perform an extra query to check for the uniqueness of each attribute having a uniqueness validation, even if that attribute hadn’t changed. If the database has the corresponding unique index, then this validation can never fail for persisted records, and we can safely skip it.

Allow opting out of the SameSite cookie You can now opt out of using SameSite on your cookies by passing same_site: nil.

Common Table Expression support added “out-of-the-box You can now build sophisticated queries with Common Table Expressions using the .with query method on models. The .with method allows the usage of Active Record relations without the need to manually build Arel::Nodes::As nodes.

Allow passing Hash on secure password validations You can now pass an option hash to _has_secure_password, with :if / :unless / :on keys, to control when should the validations be executed.

Add drop_enum migration command for PostgreSQL This does the inverse of create_enum. Before dropping an enum, ensure you have dropped columns that depend on it.

Add ActiveRecord::Base::normalizes This method can be used to declare normalizations for attribute values. Normalizations are applied when attributes are assigned or updated, and the normalized values will be persisted to the database. Normalizations are also applied to matching keyword arguments of finder methods. This allows a record to be created and later queried using an un-normalized value.

That’s a wrap! Have a great New Year’s Eve and see you next year!

Subscribe to get these updates mailed to you.