I have an application that is used by several different organizations. (each organization runs their own copy)
In the application, there are users, and each user can have a number of specialties. The specialties vary from organization to organization. Also, the possible specialties may change from time to time, according to the wishes of that particular organization.
Normally, I would think that I would create a specialties table with a has and belongs to many relationship with users. But I don’t want to be building different tables for each organization, and I want them to be able to add and delete specialties at will.
At the moment, I have a constant defined in my environment.rb that holds an array of the specialties (an array of strings). Then in each user, I have a serialized field that holds an array of the specialties appropriate to that user. But of course, the constant can’t be changed by the organization, and the whole thing is awkward for checkboxes, etc.
There has to be a better way, and I would me most grateful for any advice.