Connecting Parsed Words to Dropdown list/Searchbar

9 views
Skip to first unread message

Noah Altun

unread,
Feb 21, 2015, 9:03:35 AM2/21/15
to rubyonra...@googlegroups.com
Hello,

I am making an app with an existing parser, that parses a .txt and
extrapolates words and displays each on the index page.
I am very new to Rails, but my hands are certainly dirty. I am not sure,
however, how I could connect each word to an option in the dropdown
list, or having a searchbar that redirects to each word searched for.

The dropdown list is organized with a Select All, and then it follows
the English alphabet from there.

I want to have this using AJAX so that everything just gets taken care
of on the index page. Likewise, I am new to AJAX.

What would be the first step? I've been tinkering with the code a bit,
and searching the internet as well, but I've found clues on how to
progress from here.

This is my first post, by the way, and I look forward to becoming at
least somewhat active in these forums.

Thanks guys.

--
Posted via http://www.ruby-forum.com/.

Hassan Schroeder

unread,
Feb 21, 2015, 11:06:15 AM2/21/15
to rubyonrails-talk
On Sat, Feb 21, 2015 at 6:01 AM, Noah Altun <li...@ruby-forum.com> wrote:

> I am making an app with an existing parser, that parses a .txt and
> extrapolates words and displays each on the index page.
> I am very new to Rails, but my hands are certainly dirty. I am not sure,
> however, how I could connect each word to an option in the dropdown
> list, or having a searchbar that redirects to each word searched for.

Have you read the doc for ActionView::Helpers::FormOptionsHelper#select?

Implementing a form to submit a search term is pretty basic stuff;
have you gone through any Rails tutorials?

> I want to have this using AJAX so that everything just gets taken care
> of on the index page. Likewise, I am new to AJAX.

I don't see what AJAX has to do with this but If you're new to Rails
and having trouble with a simple dropdown, I'd recommend getting
that working first :-)

Good luck.
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote
Reply all
Reply to author
Forward
0 new messages