jeudi 18 février 2016

how to add and operator in active record query

i need to add one more condition with and in this query, (ie; and properties.property_type_id != 'NULL')

How to add in this active record?

@properties = Property.where(category_id: Admin.select("category_id").where(id: current_user.id))

Please help Any help is appreciatable

Aucun commentaire:

Enregistrer un commentaire