So I am having problems setting up a link to my index search action. I
am going to post the code first and then explain my situation.

Controller:

def index
    @page_title = 'Jobs List'
    @jobs = Job.search params[:search], :order => "job_number_sort
DESC", :page => params[:page], :per_page => 20
  end

 def advanced_search
    @page_title = 'Advanced search'
 end

Index View:

<div class="buttonsTop">
        <%= text_field_tag :search, params[:search] %>
        <%= submit_tag "Search", :name => nil %>

  <%= link_to 'Advanced Search', :action => "advanced_search" %>
        <% form_tag jobs_path, :method => :get do %>
</div>

Advanced Search View:

     <div class="buttons">
        <%= params[:search] = text_field_tag :search %>
  <%= link_to 'Search', :action => 'index', :search => params[:search]
%>
        </div>

Routes.rb file:

map.resources :jobs, :member => { :report => :get },:collection =>
{ :advanced_search => :get }

The search in my index works fine, so I am just trying to get my
advanced search to link to my index search action. The problems is
that I get the following URL:

http://localhost:3000/jobs?search=%3Cinput+id%3D%22search%22+name%3D%22search%22+type%3D%22text%22+%2F%3E


Thanks in advance


-- 
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