I've got a constant of difficulty levels in my 'Tutorial' model
which is a hash ofDIFFICULTIES = {"Beginner" => 1, "Intermediate" => 2, "Advanced" => 3}
However when I pass it to my options_for_select helper they appear
in a completely different order. Is there any way to keep them in the
correct order?
Hashes are unordered (at least in ruby 1.8). As far as
options_for_select is concerned you can use something like
[['Beginner', 1], ...]
Also is this the best way to keep a small list like this that isn't related to a database table?
constant in the tutorial model sounds fine to me.
Fred