platanus / activeadmin_addons

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

Enum translations #442

Closed difernandez closed 1 year ago

difernandez commented 1 year ago

This PR adds enum translation support in tag column and rows, as well as in select input filters. Translation is already supported in formtastic, but this only works for inputs in a form for the model object, when used in filters the object is a Ransack object, and the translation didn't work the same. Changes include:

Plus, last three commits include circleci and test suite related fixes.

Question for the reviewer: I'm not sure I put the code of the filter extension where it should be. As it was an extension, I put it in the /support folder, following the example of the RansackFormBuilderExtension. And given that it is changing behavior of an input filter, I put a test for this in spec/features/inputs. Let me know if you would change any of this

difernandez commented 1 year ago

@ldlsegovia requested re-review, as I had to include a fix elsewhere for the new tests to pass: default_select setting in select2_spec was leaking to tests that ran after it