Living on the edge (of Rails) #18

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

27 Apr 2008

This week’s report covers changes from 21 Apr 2008 to 27 Apr 2008 (the day the corresponding Rails Envy podcast was recorded).

Not much interesting to report this week – there were mostly a bunch of bugfixes and Ruby 1.8.7-compatibility commits.

Introduce ActiveResource::Base.timeout and rescuing from Timeout::Error in ActiveResource::Connection

These are 2 changes that I’d talked about earlier this week so I won’t repeat myself – take a read through ActiveResource timeouts and why it matters.

Smart integer datatype for the MySQL adapter in migrations

The MySQL adapter in Rails now maps the integer column type in your migrations to either smallint, int, or bigint depending on the :limit option.

This means that a migration like this:

def self.up
  create_table :searches do |t|
    t.integer :foo, :limit => 2
  end

will create your foo column as a smallint(2) MySQL datatype (instead of int(2) before). (More information MySQL numeric datatypes.)

Credit goes to DHH for this patch.

Related changeset: http://github.com/rails/rails/commit/a37546517dad9f6d9a7de6e1dba4d960909d71e8

As always, let me know of any suggestions or how I can improve the Living on the Edge (of Rails) series.

2 Responses to Living on the edge (of Rails) #18

Avatar

labria

April 27th, 2008 at 7pm

I don’t think you can make the series better — it’s awesome already!

Avatar

A Fresh Cup » Blog Archive » Double Shot #195

April 28th, 2008 at 6pm

[…] Living on the edge (of Rails) #18 – It’s been a quiet week. […]