Try using a form instead of link_to.

I'm pretty sure the line

    <%= params[:search] = text_field_tag :search %>

assigns the html equivalent of text_field_tag :search to params[:search] and
that is what's being passed to your index action.

try


<% form_tag jobs_path, :method => :get do %>
  <%= text_field_tag :search %>
  <%= submit_tag 'Search' %>


On Thu, Jul 29, 2010 at 3:53 AM, Chiyu Ian He <[email protected]> wrote:

> Just a update.
>
> I tried hard-coding the search from my Advance Search View:
>
>  <%= params[:search] = 12345 %>
>   <%= link_to 'Search', :action => 'index', :search =>
> params[:search]
>
> and
>
>  <%= link_to 'Search', :action => 'index', :search => 12345
>
> Then performed the search and it worked, so I no longer think that it
> has to do with the link_to so I am open to suggestions why the above
> Advanced Search View doesn't work.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<thinking-sphinx%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
>


-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" 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/thinking-sphinx?hl=en.

Reply via email to