dimanche 3 janvier 2016

How to implement select2 gem with contents retrieved from a table in Rails (association)

I am trying to implement select2 rails gem in my project. But it is not rendering properly.

My question is, I have a table called college which consists of a list of colleges. I want to implement drop down with search using select2 gem. I need to how to call the select2 from the form. When I use collection_select, I am getting two dropdowns, one of collection_select and other from select2.

Can anyone tell me how to do this?

Aucun commentaire:

Enregistrer un commentaire