I have a data structure:
t.integer :userID t.string :apikey t.integer :characterID
The userID should be the primary key (name is not
Instead of circumventing the ActiveRecord model, I made userID a normal column and used
userID
validates_uniqueness_of :userID, :message => "userID needs to be unique"
on the model to validate it.