Raw needed on select tag options? Rails3/Ruby1.9.2

When passing a string of options to select tag it appears it you need
to use raw.

This does not work
<%= select_tag “people”, “David” %>

This does
<%= select_tag “people”, raw(“David”) %>

Is this WAD? (Working As Designed).

example usage taken from

Creating options from options_for_select works fine but I have cases
where I usually add 1 option

options = ‘Select Duration (in months)’ +

When I do this I need to do use raw.

<%= select_tag “months”, raw(options) %>

Assuming this is WAD the documentation should probably be updated.

Is there a better way to do what I am doing above (adding an option to
the options_for_select output)?

Tony P.

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