Constructing a query from an object


Apart from checking each field in an object created from form

params, is there an easy way I can construct a query from an object? For
example, I’m doing this:

@candidate =[:candidate])

And go on to check each attribute if it’s blank and thereby constructing
a query. It’s pretty common, so I’m guessing there should be a easier


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs