I have a model that contains mostly ID values that link it to other
tables.  Users want to be able to view the "pretty" data, not IDs.
That is easy to do (in table-plus, view fields things like
"xyz.name").

But, they also want to search and sort on those "pretty values."  For
example.  FOO_ID points to table FOO, which has a field called BAR
that contains a nice long string.  My table plus field contains a
reference to "foo.bar" to pull that data into the table view.  Let's
say out of 1000 rows, 10 contain the string "squirrels eat nuts".  The
user wants to be able to type in "squirrels" in the search box and
find all rows with that value.  But what happens is the search fails
because there is no such field called foo.bar, it's a magical
reference that rails works hard to fill in for me during the process
of displaying the page.  The REAL value is FOO_ID which is some
numeric value.

What is the best way to approach this?  How do I even begin?  I also
need to sort on these same fields (and I want to sort by the text, not
the ID values).

Any thoughts, pointers on where to look for examples of this same
thing would be welcomed!

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to