Well, I’m working on adding a new type of user (organization) to my
application, using a different database table than the standard User
table (in the end, I think it works out being easier to deal with than
creating another column in the original User table for account type).
However, I’m running into a user registration problem. I can register
both types of users fine, however, a screen name can be shared between
the different tables. For example, a user can register with the screen
name “foo”, and an organization can also register with the screen name
“foo”. Obviously, this creates login problems, so I’d like to try to
prevent this. Unless theres something I’m missing about
“validates_uniqueness_of”, that only works within one table. How can I
make my program check that the new screen name is unique to both tables?
Thanks for any help