Hi. Quick question, if I have a `belongs_to` relat...
# avo-2
l
Hi. Quick question, if I have a
belongs_to
relationship that has 60K+ records, how can I tell avo not to try and load all of them but only do a search?
l
Hey Holden
you're looking for searchable belongs_to
there's a demo video about that feature (below the title)
l
Ah, thanks. I had tried setting it to false!
l
haha
setting it to true would enable it
l
At least it lets the page load anyway, now I have to fix the rest. Thanks
l
yeah. you should enable search on that associated resource
l
yup, and I needed to install ransack.
l
yes, that's correct
l
Also, just an interesting side note, Ransack 4.0 didn't work.
l
why didn't it work?
l
3.2 worked fine.
l
it raised an error for
ransackable_attributes
, right?
l
Yup
I'm guessing something about this issue: https://github.com/activerecord-hackery/ransack/issues/1273
l
technically, that's an upgrade operation
yes. that's something you should use for added security when implementing a dynamic ransack search. with Avo's search, that, technically, isn't necesarry, but the library still requests it
l
Yeah, it makes sense, I'm just gonna use 3.2 for now. 😉
l
got it!