Open patdec opened 1 month ago
I haven't reviewed it thoroughly but when implemented in #442 the reason given was that formtastic solution with translations worked fine for inputs but not for filters.
One thing to notice is that the version you are referencing (5.0) seems newer to what is installed here (4.0), so that may be something to look at.
I'll take a look when I get a bit of time, but if you want to dig deeper, feel free! Thanks for the report.
Describe the bug
Since v1.10.0, when I want to display an ActiveAdmin index page containaing a select filter with 'multiple' option enabled, an exception is raised:
example of input invoking this error:
With previsous version 1.9.0, it works without issue.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Additional context
The bug is related to this method https://github.com/platanus/activeadmin_addons/blob/master/lib/activeadmin_addons/support/select_filter_input_extension.rb#L3:
it overrides the one from Formtastic https://github.com/formtastic/formtastic/blob/master/lib/formtastic/inputs/base/collections.rb#L127
object
is a Ransack object without methoddefined_enums
defined. And for this reason, it works:But with
klass
, it's the User class that invoked and it fails:Why the original method had been overriden ? Especially, why the receiver is the class method and not the object ?