This Week in Edge Rails

Posted by Mike Gunderloy November 07, 2008 @ 01:22 PM

Rails, as you probably know, is under active development. So, for those of you who don’t have time to read every commit to the source, we’ve decided to revive this section of the weblog. This time around, I’m covering 3 weeks of commits: the time since Rails 2.2 RC1 (otherwise known as Rails 2.2.0) was released. Though there aren’t any major new features being added as Rails drives towards the 2.2 release, that doesn’t mean the source has been completely quiet: there have been about 75 commits in that three-week period. Here’s a look at some of those changes.

In the run-up to 2.2, we’re seeing a batch of little bug fixes, as people try to ensure quality in the release. These include:

  • Squashing a binary data corruption bug that surfaced in the PostgreSQL adapter. commit
  • The regex behind redirect_to can now accept a wider variety of URL schemes, making it possible to redirect to some destinations that were previously inaccessible. commit
  • A regression in date_select and datetime_select that could raise a Null Pointer Exception under some circumstances has been fixed. commit
  • The sanitize helper has been fixed to avoid double escaping already properly escaped entities. commit
  • FormTagHelper has been stopped from generating illegal HTML if the name contains square brackets. commit
  • A memory leak was squashed in Active Record scoped methods. commit

Some of the major features for 2.2 have been getting fine-tuned as well. There’s been work to clean up some loose ends in the thread safety department, and changes to make the I18n backend reload its translations in development mode. The included Prototype bits were bumped to the latest 1.6.0.3 release. The code for configuring, loading, and vendoring gems has had some attention, and the code for maintaining database connection pools has come in for some fine-tuning as well.

Just because we’re in feature freeze doesn’t mean that a few new features can’t sneak in:
  • The current_page method is a bit more reliable now in that it ignores options you don’t explicitly supply (making it more friendly to URLs that use the query string for pagination and the like). commit
  • The default logging has been cleaned up to be less chatty: you’ll see fewer duplicate log messages as Rails goes about its business. commit
  • The render method now takes a :js option to allow you to directly render inline JavaScript without using RJS. commit
  • If you’ve got a current (Ruby 1.8.7 or greater) version of Ruby, Action Mailer turns on STARTTLS if the server supports it; this makes Action Mailer compatible with GMail without the need for plugins. commit

One final note: I’m deliberately not trying to cover every single commit here; just those ones that struck me as most interesting. But if I left out something that you think is highly significant, feel free to add a pointer in the comments!

Posted in Edge | 17 comments

Comments

  1. Simon Nielsen on 07 Nov 14:28:

    cool man … i’ve been missing this part of the blog ..

  2. Nick Pavlica on 07 Nov 15:31:

    Thanks for keeping us up to date! It’s nice to see more entries on this blog as well :)

  3. Still a Fan Boy on 07 Nov 16:01:

    Now this is the kind of information we expect on this blog.

    Not one mention of any PDF, book or screencast for sale.

    Great Job Mike! You’ve done us proud!

  4. Oh finally! on 07 Nov 21:01:

    This was one of the best part of this blog :)

  5. iGEL on 07 Nov 23:48:

    Is this sanitizer change such a good idea? It should changeable via a parameter or something. What if an user wants to explain the behavior of &?

    ”& will be displayed as &” will be displayed as “& will be displayed as &”.

  6. iGEL on 07 Nov 23:51:

    LOL. The behavior above is exactly as I described. What if the user wants to write “& a m p ;” (without spaces)

  7. paulc on 08 Nov 06:32:

    I agree, its not to not have hawking once in a while.

  8. Stephen Bannasch on 08 Nov 21:56:

    Perhaps the user will write this:

    &amp

    Which will if it turns out correctly was actually written in this textbox like this:

    &amp

    Without preview it’s hard to tell.

  9. denketzwerk on 11 Nov 16:22:

    This was one of the best part of this blog :)

  10. Juliann Leblanc on 12 Nov 21:13:

    0wvw2duq500manux

  11. Bernice Parsons on 12 Nov 22:20:

    1eshsn232sdf0fup

  12. Gerard York on 12 Nov 22:35:

    7j27af9ipmq52pa0

  13. Meredith Travis on 13 Nov 02:12:

    loqk3fsl2lvornpg

  14. Antonio on 13 Nov 08:51:

    Will the soon released Rails 2.2 final checked for running with the stable version of Ruby 1.9.1 (the roadmap says it will be released at the 20th of december) ???

  15. Csiszár Attila on 14 Nov 21:38:

    ...”changes to make the I18n backend reload its translations in development mode”...

    I wondered this funcionality today when I played a little with I18n then I came here, update rails gem, and now its is working…

    Rails is really going toward in a promising way.

  16. Csiszár Attila on 14 Nov 21:41:

    Ohh… and of course thank you Mike. You have done a really good job with guides and infos.

  17. test me on 19 Nov 06:43:

    Is there also a new test for date_select and datetime_select to prevent another regression?