I want to filter users by email
, name
and/or phone
.
I have this in my usuarios_controller.rb
:
if params[:usuario]
@usuarios = Usuario.where({:Email => params[:usuario] }).order('created_at DESC')
end
How do I add a "OR" to this?
I want an OR condition among all these parameters.