Rails / Ransack: array of eq_all identifiers

@array = [1, 2, 3, 4]

I have the following input

= f.input :organism_id_eq_all, collection: @array

But it does not work in ransack, I get the following sql:

SELECT ... WHERE `organism_id` IN (0)

What is wrong with my code?

Thanks.

+4
source share
1 answer

Try _ininstead_eq_all

= f.input :organism_id_in, collection: @array

Presented HTML will generate an array of selected identifiers when POSTED.

+1
source

All Articles