I’m starting to learn Rails, and I have a question about SQL usage.
I have some fields on my view that will be used as a search form.
So, I have the search parameters, but what’s the best way to
use them on a sql query?
let’s say I have 3 search parameters, and the user uses 2 of them.
Object.find(:condition => [“text LIKE ? AND text2 = ? AND number 3 =
I can’t do this, because if the user send me only 2 parameters the query
Does anyone know what’s the best way to do this?