SunQuest
           Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 16th, 2007, 05:20 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,440 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 50 m 56 sec
Reputation Power: 797
Critiques wanted for my solution to this rails problem

Hey guys,
I was recently playing around with Rails and Ajax functions (all the Web 2.0 bits). Mainly, I was playing around with the text edit auto-complete functionality that comes along with rails. You can see this functionality in action in quite a few major websites (such as http://finance.yahoo.com or Google Suggest) where the text box starts to display auto-complete options as you're typing in the text box.

When playing with this functionality, I managed to hit a few snags. It is very easy to create this functionality in rails if you only need to query a single field from a single table with no limiting conditions. However, when you try to do something more than this, it isn't always that easy.

In my case, I was trying to limit the number of suggestions for the auto-complete based on the values of other fields on the web page. On top of that, the simple examples in my book(s) and certain websites only showed how to query a single column in a single table for the results whereas I wanted to show the options from two columns on different tables. The examples also showed no way of limiting those results with a WHERE clause (in my case, I needed to filter by non-deleted items).
As it turns out, there aren't too many articles dealing with these real-world issues (in fact, for my first issue, I couldn't find a single answer even after a lot of googling)

After a bit of googling, some HTTP header snooping, some javascript hacking and a bit of elbow grease, I managed to solve all these issues. For the benefit of others, I've put my solutions in this article on my website.

I would sure appreciate some feedback from you folks about the contents of that tutorial. Any useful comments will be gratefully acknowledged in my credits page.

Thanks in advance for your help.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > Critiques wanted for my solution to this rails problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway