Select :selected doesn't actually generate a selected option


I have code that looks like this:

<%= select(‘date’, ‘month’, [
[“12e$B7ne(B”,“12”]], :selected => @month, :include_blank => false ) %>
select_year(, @month, 1)) %> <%= submit_tag ‘e$B9T$/e(B’

where @month is the number of the current calendar month. I’ve tried
it with to_s if that was the problem, I’ve tried just :selected => 5,
or :selected => “5”, but nothing affects it - there is never an

in the generated html.

Is it broken, is it just because I’m using utf8 strings (doubtful) or
am I just doing something horribly wrong?


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