Hi
This is how I did in the past, it's in a project I haven't upgraded to master
yet, but I think it
should still work:
config.actions << :field_search
config.field_search.link.parameters = {:kind => :field_search}
Regards
El domingo, 21 de febrero de 2021 6:14:53 (CET) Dennis Bulgatz escribió:
> Can you confirm that search/field_search swap is working in current master,
> or 3.6.0 rc2 ? I can only get search or field search to work, not both,
> and no "swap" behavior.
>
> If you have a working controller example, could you post it?
>
> Thanks!
>
> On Thursday, December 10, 2020 at 10:37:41 AM UTC-6 [email protected] wrote:
> > Hi
> >
> > This works like a charm, thanky you very much.
> >
> > Regards, Jan
> >
> > [email protected] schrieb am Freitag, 4. Dezember 2020 um 11:28:28 UTC+1:
> >> El jueves, 3 de diciembre de 2020 15:48:53 (CET) [email protected]
> >>
> >> escribió:
> >> > Hi
> >> >
> >> > Is it possible to add an action/button/whatever to let my users toggle
> >> > between seach and field search in an List?
> >> >
> >> > Regards, Jan
> >>
> >> Hi
> >>
> >> By default, you must choose if you want to use search or field search
> >> actions,
> >> swapping search with field_search action (config.actions.swap :search,
> >>
> >> :field_search), or leaving default search action.
> >>
> >> If you add field_search action, instead of swapping search, it will add
> >> action_link to show search with same parameters as search's action link,
> >> which
> >> will open form for search action. You can define kind parameter of the
> >> field_search's action_link:
> >>
> >> config.field_search.link.parameters = {:kind => :field_search}
> >>
> >> In this way, you will get 2 show search links, so you may want to change
> >> some
> >> labels too.
> >>
> >> Regards
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/activescaffold/2216052.xfh5WhB5fI%40pc-sergio.