platanus / activeadmin_addons

Extends ActiveAdmin to enable a set of great optional UX improving add-ons
MIT License
763 stars 288 forks source link

[BUG] Tags not working for input with enum collection #481

Open fedeagripa opened 1 year ago

fedeagripa commented 1 year ago

Describe the bug I have a normal form as follows:

  form multipart: true, direct_upload: true do |f|
    f.input :regions, as: :tags, collection: Investor.regions.keys
  end

My model enum looks like this for the enum: enum regions: [:berlin, :dusseldorf, :hamburg, :hannover]

And finally I get no options being listed in my dropdown and a web error that there are no matching ids for my laber for (check screenshot bellow)

To Reproduce You can create any model with my enum definition, then create a form for that model with the input as I started describing and that should be enough to test.

Expected behavior Select dropdown showing collection options and enabling to select multiple ones

Screenshots Screenshot 2023-08-25 at 16 22 18