In Rails 0.14.3, I’m doing the following in a view:
<%= select 'folder', 'format', ['a', 'b', 'c'] %>
This line in is failing with:
ActionView::TemplateError (too few arguments.)
Am I calling select incorrectly? (Yes, the @folder object does exist,
and does have an attribute named ‘format’.) My reading of the
options_for_select documentation says this should work. Am I missing
something, or should I file a bug?
Replacing [‘a’, ‘b’, ‘c’] with [[‘a’, ‘a’], [‘b’, ‘b’], [‘c’, ‘c’]]
generates the same error.
The stack trace looks like this:
format' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_view/helpers/form_helper.rb:247:insend’
value' /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/ action_view/helpers/form_options_helper.rb:299:into_select_tag’