mercredi 18 février 2015

Ruby on Rails - Collection_select, option class


Vote count:

0




is it possible to pass a model-attribute of the collection to the select-options class?





<%= f.collection_select :bank_connection_id, BankConnection.all, :id, :bank_name, {:class => ? } %>


The Questmark shows where i wanted to use a attribute of the BankConnection. The attribute is named customer_id.


Background of this: I want to use the chained plugin for rails and therefore i must set the class to the specific customer-id.


Thanks for your help.


Tobias



asked 29 secs ago







Ruby on Rails - Collection_select, option class

Aucun commentaire:

Enregistrer un commentaire