Forum: Ruby on Rails Storing search value in database

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
28be3be213eeed3f66e0a20f1e20c7ac?d=identicon&s=25 Remco Swoany (zwaan123)
on 2009-06-09 13:30
Hi,

We got a search form (with autocomplete) for airlinetickets. The idea is
that we want to store the search query of all our visitors in our
database. The objective is to add this info to our management info.

Someone ideas?

remco
2dddec0f7717cae77ac6bceede6be5bc?d=identicon&s=25 Ram (Guest)
on 2009-06-10 07:13
(Received via mailing list)
http://railscasts.com/episodes/37  --- Simple Search form

http://railscasts.com/episodes/111 --- Advanced Search

On Jun 9, 4:30 pm, Remco Swoany <rails-mailing-l...@andreas-s.net>
F073247b1a99fb527a9e0569c0604c1a?d=identicon&s=25 Matthew MacLeod (Guest)
on 2009-06-10 12:52
(Received via mailing list)
Not sure exactly what the issue is...

Create a model (say, SearchQueries) and whenever anybody hits your
search controller — presumably you only want to capture full queries
and not auto-complete requests – save the query into the database.

If you're using an autocomplete search which provides links direct to
particular pages, you may also need to capture these - probably by
appending a parameter to the address and making sure that you create
and save a search query when someone hits those pages straight from
the autocomplete list.

-Matt

On Jun 9, 12:30 pm, Remco Swoany <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.