I’m really new to Rails and I was looking for a way to use
IndexedSearchEngine with a “get” call instead of the default “post”. I
have the script by itself on a page /myapp/app/view/search/rhtml and I
want to be able to bookmark the query string.
I can’t seem to find where in the code the call to form_tag is. This is
as likely as not a terribly stupid question but like I said I’m -really-
new. Any help would be greatly appreciated.
I’m not totally familiar with the Indexed Search Engine, but I’m not
certain there is a form field involved. It looks like the whole thing is
pulled off using Ajax by doing an observe_field on :search.
Out of the box, IndexedSearchEngine doesn’t really have what you’re
looking for - although it is a good suggestion.
Here’s is an option for what you can do:
Construct your URI like this: http://site.com/search/search?terms=Tim%20Smith and add a partial to
your application in /app/views/notes/_search_results.rhtml that looks
something like this:
All About Tim S.
<%= stylesheet_link_tag 'scaffold' %>
<%= engine_stylesheet "indexed_search_engine" %>
<%= javascript_include_tag :defaults %>
<%= render :partial => 'search/search_field' %>