Living on the edge (of Rails) #9 – the sleeper edition

In: Edge Rails|Open Source|Ruby|Ruby on Rails

27 Feb 2008

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:password@example.com/').

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!

4 Responses to Living on the edge (of Rails) #9 – the sleeper edition

Avatar

Pratik

February 27th, 2008 at 8pm

Hey Chu Yeow,

Good stuff as always. One suggestion/complaint though. I really liked your old style where mentioned the contributor names at least. I feel it provides nice encouragements to people who just started contributing. Just mentioning their name is good enough :-)

Thanks!

Avatar

Chu Yeow

February 27th, 2008 at 10pm

Pratik, thanks for reminding me about that! I’ve been forgetting to give credit where for most of the patches in recent posts when I think when I started one of the main things I wanted to do was to give credit to the awesome Rails contributors. I’ll remember to do that from now on.

Avatar

Dick Tionary

February 28th, 2008 at 10pm

You are misusing the word “sleeper”. It means unexpectedly good, as in “sleeper hit”–not “slow” or “boring”.

Avatar

A Fresh Cup » Blog Archive » Double Shot #155

February 29th, 2008 at 8pm

[…] Living on the edge (of Rails) #9 – the sleeper edition – Not much going on in the main development line this week. […]