Use of guid values and foreign key constraints

It is pretty easy to make primary keys a guid value by:

class CreateAccounts < ActiveRecord::Migration
def self.up
create_table(:accounts, :primary_key => :guid) do |t|

But I am unsure how to create the foreign key constraints to allow them
to accept the guid values. Setting the column type fails (t.guid
:account_id), as it seems that guid an undefined method.

Setting the relational column to a string also causes a failure when
creating the foreign key constraints.

Does anyone have any experience with this?

I see there is a plugin here, but I don’t know if this will fix the
issue with the foreign keys.
http://wiki.rubyonrails.org/rails/pages/Uses+Guid+Plugin

Thanks for the help