Perform a Query String

Asked

Viewed 56 times

1

Staff have the following method and Query:

mt_dispositivo = MtDispositivo
    .where("id_conta = 28 or id_conta = 29 or id_conta = 30 or id_conta = 36")
    .select('nome, data_criacao, data_atualizacao, tipo_conexao, is_online, status_atualizacao, geolocalizacao_endereco')   

    send_data mt_dispositivo.to_xls(:except => [:id_conta], content_type: 'application/vnd.ms-excel', filename: 'mt_dispositivo.xls')

This method makes an Excel Download as ID and other attributes of all Customers who are Online. I need to do a String query that returns only those that are in the Beginning: "BS, FS, SR and FNAC"

How would it look?

  • 1

    What language does the question refer to?

  • Ruby language.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.