Setting rails url helper in input_html should be parsed and correctly set to the data attribute:
filter :user, collection: -> { User.all }, input_html: {class: "select-remote-data", "data-ajax-url": -> { users_api_url } }
No matter in which form I will pass the rails url helper it fails to parse it with error undefined method for,
in the case of passing it directly "data-ajax-url": root_url or it is adding whole proc object into data attribute if I will pass as above the lambda.
Simply add `input_html: { "data-url": root_url } to any filter in the AA model.
The idea is to use select2 with a remote call for fetching big data set, for this one I need proper extra attribue which select2 will parse while initializing select.
Update:
Just to mention that for f.input it works correctly:
f.input :user, as: :select,
59 collection: User.where(id: object.user_id), include_blank: false,
60 input_html: {class: "select-remote-data", "data-ajax-url": users_api_url}
Thanks!
after merging related PR such will be possible
filter :title, as: :select, input_html: proc{ {'data-ajax-url': users_api_url} }
Most helpful comment
after merging related PR such will be possible