argerim/select2-rails

Loading remote data not working

Closed this issue · 1 comments

I am using active admin and select2 I am trying to follow the example of https://select2.github.io/examples.html on Loading remote data.
in my active admin I have 1 select2 form that works great when I do

f.input :article_id, as: :select, :collection => Article.pluck(:title, :id), :input_html => { class: 'select2' }

but when I try to do f.input :article_id, as: :select, :collection => Article.pluck(:title, :id), :input_html => { class: 'select2 js-data-example-ajax' } I get the error
Error: Option 'ajax' is not allowed for Select2 when attached to a element. I have the same js as the example

simi commented

I think you're using 3.5 version, but that docs are documeting 4.0 version. Anyway please open select2 questions somewhere in [upstream community](I think this is solved in 4.0 version. Anyway please open select2 questions somewhere in upstream community.).