Pardee, Roy
2008-Nov-25 17:43 UTC
making arrays of valid values user-editable--best practice?
Hey All, I''ve got a couple of valid-value lists that I would keep as arrays in the appropriate model. So for instance: class Person < ActiveRecord::Base ROLE_NAMES = [''Admin Assistant'', ''Programmer'', ''Investigator'', ''Project Manager'', ''Other''] # blah blah blah end Now I need to convert this into something the user can add values to. The 2 options that come to mind are: - Make each such array a model in its own right. - Make a kind of meta-model that would hold all of these arrays, and use it to populate all of these arrays at application startup. I''m most attracted to the second option, but I''m not sure it''s going to be much less work, since I''ll probably have to fake out individual CRUD screens for each array, which seems like it could get weird. Anybody been down this road? Thanks! -Roy Roy Pardee Research Analyst/Programmer Group Health Center For Health Studies (Cancer Research Network) (206) 287-2078 Google Talk: rpardee --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---