سؤال

I dynamically build a pick-list with a collection I retrieve from a table, using "collection_select". I would like to color differently the list items, according to an attribute from the collection, ie :

black if they're available / grey if they're not.

How can I do this ?

Thank you for your help

هل كانت مفيدة؟

المحلول

I found out by myself. I use the parameter :disabled => << sub-collection >>

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top