mfairburn / activeadmin-select2

ActiveAdmin Select2 integration
MIT License
55 stars 66 forks source link

Not working with input_html. #3

Closed YasminRodriguez1 closed 8 years ago

YasminRodriguez1 commented 9 years ago

The gem worked perfectly when I did this:

   f.input :students, as: :select2_multiple, collection: Student.all

But when I add the ajax call I need, it stops working and a normal select is there.

 f.input :students, as: :select2_multiple, input_html: { class: "chosen activityStudents" }, collection: Student.all
adis-io commented 9 years ago

@NuhaKhaled Your class is overrides default select2's class, so you need add class yourself, for example:

f.input :students, as: :select2_multiple, input_html: { class: "select2-input chosen activityStudents" }