Hello again! One more question, how can I either e...
# avo-2
l
Hello again! One more question, how can I either enable the search to return more than 8 results? Or somehow get the rest of those that are hidden, eg if I do a search containing 18 results and seemingly can't narrow the search further by typing more, how can I get all of these 18?
l
hmmm, but yuo can continue to type and narro the search
we show only 8 by default
that is a magic number, but we'd merge a PR if we had one that would make that number a configuration option
l
Yeah, I have an edge case here with just a lot of records and it doesn't work with a search with "beatles" because there are 18 of them and it's not picking up the most obvious one. 😭
l
you can tweak the searching "algorithm" in the
search_query
block
order them by smallest number of characters? not sure if that's possible
actually, if you order by name, that one might be the first one
exmaple:
scope.ransack(id_eq: params[:q], name_cont: params[:q], m: "or").result(distinct: false).order(name: :asc)
notice the
.order(name: :asc)
l
Yup, that's better thanks.
Also, I'm having a small issue getting Avo to authenticate using the passwordless gem.
I have a
:current_user
same as devise which I'm setting in the application controller, but this doesn't appear to be enough for avo to find and use it.
l
can you please open an issue with a bit more info (configuration, gems, what are you trying to do, etc)? https://avo.cool/new-issue
l
Sure, thanks
Done.