What would be a good way to store profile-information, in the cases
where the information can be selected from a list of choices? i.e.
gender (male,female), religion or marital status.
The lists don’t change, so putting that in the db doesn’t seem like a
good idea, but how do i put something like this in a model?
If you’re asking how to store the options for the user to choose from,
you ought to just put them in your view. If you’re asking how to store
the user’s selections, they ought to go in your database. If you’re
asking something else then I didn’t understand your question
i meant a good way to store the selections in the database,for example
should i store someone’s marital status just as a string, using…
validates_inclusion_of :marital_status, :in => %w(single married)
…or would it be better to just use a number, and if so: how would i
map those numbers in a handy way in my model (constants?) so i can use
just the corresponding options (1=single,2=married,etc) elsewhere in a