I am trying to set up a drop down list with a optgroup with active users. i
know the following code is wrong, but would there be any way of doing this
how i have it? right now if you take the raw section and just have
data.collect {|a| [ a.name, a.id ] } instead, it works great for just
showing the names of the users, but i want to add that optgorup. How would
i go about doing that?
= f.select "#{available_filter_option.col_names}",
[raw("<optgroup label='Active Users'><option> " +
data.collect {|a| [ a.name, a.id ] } + "
</option></optgroup>")],
{:include_blank => ' '}, class:
'closed_filters', filter: available_filter_option.col_names,
:filter_type => 'select_box'
Thank you in advance guys.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/237b2172-bbf8-4dd1-b347-f095e58f38c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.