How to hardcode key-value option pairs in select tag

ruby-on-rails

Solution

No, no need to create a table. It will look something like:

select "cron", "day", [[ "Sunday", 0 ], [ "Monday", 1 ], ["Tuesday", 2], [etc..]]

It would probably be better to stick the options in a helper, rather than having them site in your view.

Problem

I can't find anywhere a tutorial on how to hardcode HTML inside of select tag. All I need is this: ``` <select name="cron[day]"> <option value='0'>Sunday</option> <option value='1'>Monday</option> <option value='2'>Tuesday</option> <option value='3'>Wednesday</option> ... </select> ``` Don't feel like making a special table for this. Or should I?

Original source