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

推荐订阅源

博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
Stack Overflow Blog
Stack Overflow Blog
Jina AI
Jina AI
Vercel News
Vercel News
H
Help Net Security
Martin Fowler
Martin Fowler
美团技术团队
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
小众软件
小众软件
T
Tailwind CSS Blog
WordPress大学
WordPress大学

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
Rails 1.0 RC4 (0.14.3): It's the final countdown!
David Heinemeier Hansson · 2005-11-07 · via Ruby on Rails: Compress the complexity of modern web apps

Comrades, we are so close to the goal that the relieve should be tastable. The mythical 1.0 release is now penned to be the very next release once we rattle out the heinous bugs from this one. So we need every man, woman, and child at work testing the living daylights out of this final release candidate. Upgrade your apps, start new ones, kick the tires, rev the engine, do it all!

So what’s new? What’s in there to make it pay to upgrade today rather than at 1.0? Lots! In a regular universe, this would have counted as more than merely a 0.0.1 increment. We got a ton of stuff especially for Active Record and the Rails infrastructure.

The new commands

  • script/server: Will now use lighttpd/FCGI if both are available on the system. This makes for a considerably faster development experience than WEBrick, but is unfortunately a OS X/nix thing only. Windows users will continue to get a WEBrick-powered server launched.
  • script/plugin: Your gateway to the wonderful world of plugins. Helps you install, manage, and discover new plugins. See script/plugin —help for more.
  • script/about: Gives you the all the versions for Rails and associates. See the sample.

Active Record: find_or_create_by_X, association collection extensions, migrations for all databases

We’ve added a new dynamic finder that allows you to find or create a new record on the basis of attributes passed, such as saying Tag.find_or_create_by_name(“Summer”). It even works on associations, so page.tags.find_or_create_by_name(“Summer”) is kosher too.

Extensions for association collections is a sexy new way of adding methods to the proxies that all access delegate through. Example:


class Account < ActiveRecord::Base
  has_many :people do
    def find_or_create_by_name(name)
      first_name, *last_name = name.split
      last_name = last_name.join " "
 
      find_or_create_by_first_name_and_last_name(first_name, last_name)
    end
  end
end
 
person = Account.find(:first).people.find_or_create_by_name("David Heinemeier Hansson")
person.first_name # => "David"
person.last_name  # => "Heinemeier Hansson"

And finally we’ve really put the spit and polish on the database adapters by adding migration support to all the commercial ones. As well as giving especially the SQL Server one a good loving in general.

Action Pack: Better filter controls, fixed ActiveRecordStore, and redirect_to :back

Action Controller now has skip_before_filter and skip_after_filter to sidestep certain filters set in superclasses that doesn’t apply to the current controller. Such as specifying :authenticate in ApplicationController, but skiping it in the SignupController.

The ActiveRecordStore no longer only saves when changes have occured, so you can again rely on updated_at being incremented at each page view, and thus rely on it for garbage collection.

Finally we now have an easy way of saying “go back to where you came from” with redirect_to :back.

Upgrading from 0.14.x

It has never been so easy to upgrade to the latest and greatest if you’re on 0.14.x series. You get almost all of it for free simply by installing the latest gems and the rest by running these two commands:


rake update_javascripts
rake add_new_scripts

I’ll let you figure out what those do.

Upgrading from 0.13.x (or earlier)

Jeremy Kemper has put together a great guide to upgrading from an earlier version.

What else is new?

As usual, you get the full play-by-play story of the changes by examining the changelogs. Such wonderful bedtime reading.