spokra wrote:> I''m building a site.. Dah!! and it requires different skills for
> different jobs in different states. the site will start off in only
> one state but I want to make sure I''m ready for many states.
I''m
> thinking of a generic skills table with columns skill1 .... skillN.
> then another table with columns state, job type, skill name, skill
> column mapping to the column in the skills table.
:
:>
> My question is.. Is this a bad idea!! is there a better way of doing
> it?
Looks like this would do it
table states
columns: id and description, etc
table skills
columns: id and description, etc
table state_skills
columns: state_id, skill_id
Then link them up with something like
states model
:has_and_belongs_to_many :skills
skill model
:has_and_belongs_to_many :states
Stephan
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---