It's been a slow week on the Rails trunk this week in terms of exciting changes.
This week’s report covers changes from 18 Feb 2008 to 24 Feb 2008 (the day the corresponding Rails Envy podcast was recorded).
ActiveResource::Base now accepts user and password configuration
You can now set the user and password for HTTP authentication in your ActiveResource models:
class Person < ActiveResource::Base self.site = 'http://example.com/' self.user = 'konata' self.password = 'password' end
This is a better way to specify authentication credentials than the current way of doing it by putting it all in the site (e.g.
self.site = 'http://konata:[email protected]/').
Related changeset: http://dev.rubyonrails.org/changeset/8891
script/plugin install now supports SVN export
You can now pass the
-e/--export option to
script/plugin install to do an Subversion export of the plugin. This allows you to then check in the plugin's files into your own repository. Though seriously, if anyone really wants to do this, I'd suggest they use Piston. That is, for those of us still using Subversion rather than Git.
Related changeset: http://dev.rubyonrails.org/changeset/8921
Bug fixes for associations preloading
There've been some bug fixes the associations preloading change mentioned in Living on the edge #5:
- http://dev.rubyonrails.org/changeset/8894 - Fixed a bug where associations that were preloaded (using nested
:includes) errors out when the associations return
nil(i.e. when there are no associated records).
- http://dev.rubyonrails.org/ticket/11154 - Fixed a bug where nested includes were assuming that all records are from the same class. This is not true for polymorphic associations, causing problems when they were being used.
Yup, that's it for this week. As usual, let me know of anything I might have missed or any suggestions you may have in the comments!