I have an array of hashes that contains several fields, including first_name and last_name. Unfortunately, since its the result of an API call, I have no other ways to work with it. Regardless, I'm trying to build a basic search function where a user can enter a name and it will display the results from a newly created array.
I'm guessing that sort_by will be the best route to go, but I've been unsuccessful in finding out how to use it with multiple fields. Any guesses? The second part to the question is how you structure the sort_by, if that is the best way, to find objects that are similar to the requested query. It's not so much that a user would mispell a name (although that would be helpful) but if they put in a firstname + lastname pair, it wouldn't technically match with either field on its own. Thanks in advance. :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

