If anyone else works with Rails and can point me in the right direction,
I've found myself somewhere I've never been using this framework.

I currently have the controller populating my @restaurants object and
looping through it in the view to get my listing.  I have four buttons at
the top of the screen for choosing one of three different cuisines or all.
However, for each press of a button, it goes back to the server and does
another "find(:all; etc..." lookup and re-populates @restaurants and
re-render's the partial.  It does this all via AJAX and works great,
however, I'm thinking I want to be able to sort the list in the browser
without having to go back up to the server each time a button is pressed.
Since the list is based on distance (well, will be based on distance soon),
there will only be 20 items max returned for any zip code entered.  I want
to be able to say, "Of this list, only show me Indian, Thai, or Japanese or
all again" and keep it all local.  If I choose an individual restaurant and
slide it in from the right, populating the details via AJAX, then when I go
back to Restaurants, I want to see the exact same sorted view I had.  Doing
it this way, the only time the browser has to contact the server is for each
individual item clicked.

So how do I take my @restaurants object and populate a Javascript object
that I could then parse through locally?  I have no experience with in
browser parsing/sorting, so I'm sittin' on my thumbs with this one.

Thanks!
-=Randy



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" 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/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to