Forum: Ruby on Rails Dynamic assignment - a Ruby question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7a5582a8d74a4b9745b7278aa8a35ce6?d=identicon&s=25 Ben Rometsch (dabeeeenster)
on 2006-02-20 00:40

Coming from a Hibernate background, and just starting out learning both
Ruby and Rails, I found this blog post interested me (it details useful
functionality not currently in ActiveRecord but present in Hibernate):

My question is at the bottom of the page:

Iâ??m totally new to ruby. I have this working, but have a question. Can I
dynamically add the parameters I want to query on? Say I have a search
form, with 5 text fields each bound to a different member variable of
the same 1 class. I want to search on each field only if some text is
entered into that fieldâ?¦How would I do it?

Is this possible?
This topic is locked and can not be replied to.