Forum: Ruby on Rails Is it possible to alternate row colors for collection_select

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
gm g. (Guest)
on 2009-04-23 22:45

I have something as such:

collection_select(:obj, :types, @types, :id, :name, {}, {:multiple =>
true, :size => 4})

and I want the row colors to alternate. This is easy to do when manually
building the options tags (as you just add a class name for every other
tag), but I cant figure out how to do it the rails way

Any suggestions?

This topic is locked and can not be replied to.