I realize thi may be more complex issue than can be asnwered in this
post. But, what I need to do is create a simple query on my existing
tables via a search form. I have half my app done (I can write all the
info I want to my database), but pulling the data out dynamically is
giving me trouble.
I have both the “ruby for rails” book and the Agile Development book.
They both give great info on static queries. Such as:
post = Posts.find_all_by_title(“green”)
But I need to be able to pull the record dynamically. For instance, a
form where I can type in “green” and search the “title” and “body”
columns in the “posts” table.
It seems like a simple enough query but I’m having trouble finding good
documentation. Any ideas on how to do this or where I might find a good
tutorial for this kind of query?