It’s just data

Rails 2.3RC2

David Heinemeier Hansson: The past month has seen a flurry of activity getting Rails 2.3 solid. We think we’ve ironed out all the major kinks now, but just to be sure, we’re running one last release candidate before it heads off to the presses.

This release candidate looks much better than the last one.

The Agile Web Development with Rails book has always been chock full of executable and tested code.  With this edition, I’ve taken this one half-step further.  I have a script and data that will run the majority of the executable examples from them book and capture the output: compare 2.2 vs 2.3RC2.  If there is a next edition and if I’m part of it, I plan to take this to the next level and have the output be self-checking and hopefully a part of the Rails team’s regression test suite.

As with every release, there are changes to the generators which affect this book.  For example, Rails 2.2 will generate controllers with lines like these:

@users = User.find(:all)

And the book contains the suggestion that that particular line be modified to look like the following:

@users = User.find(:all, :order => :name)

Now consider what happens when a user who tries out Rails 2.3 and sees the following instead:

@users = User.all

I suspect that many will follow the instructions, and assume that what the book is trying to tell them is that .all must be converted into a .find if you wish to order the results.  This simply isn’t true, as the following works just fine with Rails 2.3:

@users = User.all(:order => :name)

This is a never ending battle.  Rails is evolving at a rapid rate, as are the best practices.  So with this edition we have added a reference to this site which will contain a list of changes that affect the book.  At the moment, the 2.3 page is empty, and that’s because (a) 2.3 isn’t final just yet, and (b) I haven’t seen the final version of the book so I don’t yet know precisely what page number any particular section of the book will end up on.  But if you scan that script for $RC you can see the adaptations that are already required to go from 2.2 to 2.3RC2.


submitted by gthank [link] [0 comments]...

Excerpt from programming: what's new online at

submitted by gst [link] [0 comments]...

Excerpt from rails: what's new online at

Manual trackback: Tracking Rails

Posted by Sam Ruby at

"Could not find table 'carts'" -- Rails 2.3rc2 posted by Sam Ruby @ Mon, 09 Mar 2009 12:55:00 -0000

I’m assuming that 2.3-rc3 is a typo. [link] shows the progress I made on 2.3rc2....

Excerpt from Recent Posts in '"Could not find table 'carts'" -- Rails 2.3rc2' | Pragmatic Forums at

Not to mention the fact that you could use default_scope to specify the default ordering you’d like to apply to all finders and scopes.

Posted by Nathan de Vries at

Sam Ruby: Rails 2.3RC2

[link]...

Excerpt from Delicious/wowo08/sam ruby at

Add your comment