Forum: Ferret Constructing a query from an object

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bcfc926d36e15709d7e6c70b9791211a?d=identicon&s=25 Vamsee Kanakala (Guest)
on 2006-01-06 13:41
(Received via mailing list)
Hi,

    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.new(params[: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
way.

Thanks,
Vamsee.
This topic is locked and can not be replied to.