lundi 20 avril 2015

Rails where clause with array argumens

I have some model with some joins, which ends with

array = ['table1.field = 1', 'table2.field = 2', ...]

But this ends up only with first element on array in where clause. Is there any way to pass all elements of array, so rails would join it with AND condition ?

Aucun commentaire:

Enregistrer un commentaire