Global Hash vs. DB-Model ( with profile -> eyecolour e.g.) - best practise


can somebody tell me what to do with static-models? Should I put them
into the DB or should I create it als normal Hash?

For example:
User has one eyecolour and he is able to choose the right value in a
view (select-box).

Should I create the select-box from an global hash or from an AR-
Model? Is there a best practise?

sorry for my bad english!

If it’s a list of items that will never/rarely change (gender is a
good example), it makes sense to put it in a Hash to avoid hitting the

If it’s something that would change frequently, it probably makes more
sense to create it as a Model and have it database driven.

A list of eye colors is probably something that won’t ever change, so
I’d personally make it a Hash.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs