I want to apply select2 js with activeadmin using activeadmin_addons gem on has_may through associations but when I apply all the things which are mentioned in gem it looks like select2 js not loading
I have apply all the changes for like what we need to include in js and css files
when I try to add new record by add more record it gives error like this
**$(...).select2 is not a function**
活动管理表格:**
form do |f|
f.semantic_errors *f.object.errors.keys
f.inputs 'Collection details' do
f.input :title
f.input :description
end
#f.input :wires, :input_html => { :class => "chosen-input" } # other model with has_many relation ship
f.inputs 'Wires' do
f.has_many :collection_wires, allow_destroy: true, new_record: true, heading: false do |collection_wire_f|
collection_wire_f.input :wire
end
end
f.actions
end
**
active_admin.js.coffee
#= require active_admin/base
#= require activeadmin_addons/all
当我查看页面源代码时,它显示在代码使用它之前以及在 jquery 和 jquery ujs 之后加载的 select2
当我们在新页面或编辑页面上时,我希望电线应该使用 select2 js 来搜索数据。
请提出任何解决方案