Is there any way to access the URL
# avo-2
a
Is there any way to access the URL parameters from filters in an Action?
filters = Avo::Filters::BaseFilter.decode_filters(params[:filters])
or if you just want to check for presence,
params[:filters].present?
a
Thanks Adrian. Is this also supposed to work for v3 dynamic filters? It is giving back a blank value
l
No. The helpers work for Basic filters (Avo 2 style) which are lresent in Avo 3 too
And they will work in Avo 3 too
The dynamic filters have a different params signature that doesn’t require encoding/decoding
a
Oh ok.. how then would we access the URL parameters/filters in a v3 action?
l
I don’t have it on me right now, but it’s more intuitive
You’ll just access the params object
a
I'm not seeing the filters in the params object and spent over an hour testing different alternatives .. any help is appreciated 🙏
to be clear, i am trying to access the dynamic filters searched on an index page, after the user selects and executes an action (i.e. from within the def handle)
l
can you please open a ticket with some code and a screen recording if necessary?
a
ok done.. thank you
l
thank you!
me and Paul are out for the week so we probably won't be as responsive as usual but we'll respond as quick as possible
a
thanks i appreciate it.. can't seem to figure this one out
any chance you can point me in a direction on this? spent a couple more hours and still can't find any trace of the dynamic filter params in the context of the action handle method...
l
sorry for the radio silence @alert-toothbrush-24716. myself and Paul are off this week
I replied to the GH thread
a
thank you
16 Views