Yup, it's time for your weekly dose of the changes on edge Rails, more or less covered in the latest Rails Envy podcast. Using edge Rails is neither arcane nor terrifying, and hopefully weekly reports like these will allow you to take control of your own release schedule with your Rails apps.
This week's report covers changes from 31 Dec 2007 to the day the podcast was recorded (6 Jan 2007).
- memcache-client has been vendored (included in Rails directly). MemCacheStore works out of the box in Rails now, no need to install the memcache-client gem!
- The caching code has been refactored and moved into ActiveSupport (
ActiveRecord::Base.cache_keyto make it easier to cache Active Records in combination with the ActiveSupport cache libraries introduced in this changeset.
- Fragment cache keys are now by default prefixed with 'views/'.
Fragment caching now works in RJS and Builder templates
Yup, you couldn't do fragment caching in non-erb views before - now you can.
Freezing Rails now automatically updates your Rails app
If you're using edge Rails and use the
rails:freeze:edge rake task, you probably usually forget to run (or maybe you're not even aware of)
rake rails:freeze:edge task runs the
rails:update task for you. +1 for convenience!
I prefer to use Piston so I'm gonna have to keep remembering to run my
rake rails:update now and then!
Check out the related changeset.
Only 1 optimization in the past week worth talking about: the
ActiveRecord::Base#exists? method is faster. It now uses
ActiveRecord::Base#select_all instead of a more expensive
ActiveRecord::Base#find that unnecessarily instantiates AR objects. (Check out the related changeset.)
- http://dev.rubyonrails.org/changeset/8541 - Fixed a nasty bug when trying to render partials with layout when done from within the site layout. Yes, you can have layouts for your partials in Rails 2, and yes, you can run into a bug when trying to use partial layouts in your main page layout.
- http://dev.rubyonrails.org/changeset/8529 - Fix
atom_feed_helperto comply with the Atom specifications.