How to use ActiveRecord::OrderedHash
Ruby 1.8 doesn't retain the order of objects inserted in to a hash, but with ActiveSupport::OrderedHash you can do this:
a=ActiveSupport::OrderedHash[:one, 1, :two, 2]
which gives you:
=> #<OrderedHash {:one=>1, :two=>2}>