One-to-One Associations and REST

Hi,
I’m still finding my way around RoR myself but isn’t what you want something like?:

class User < ActiveRecord::Base
has_one :Avatar, :foreign_key => “your_avatar_id_key”,
end

class Avatar < ActiveRecord::Base
belongs_to :User, :foreign_key => “you_user_id_key”,
end