You could use a Model validation to handle it. Perhaps something like this:
class User < ActiveRecord::Base
attr_accessible :company
validate do
if self.company && User.where(company: self.company).first
raise ArgumentError, "Company must be `nil` or unique"
end
end
end
It's a bit of a hack, but it should fit your needs.