Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion on form with multiple search buttons that access different indexes and models
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tyliong  
View profile  
 More options Jan 22 2009, 11:19 am
From: tyliong <tyli...@gmail.com>
Date: Thu, 22 Jan 2009 08:19:04 -0800 (PST)
Local: Thurs, Jan 22 2009 11:19 am
Subject: on form with multiple search buttons that access different indexes and models
Hi,

i want to have one form that has multiple search buttons. Something
like what google has (search and I'm feeling lucky). In this case I
want to have one search button to search the model groceries and the
other search button to search customers.

my search view is currently this:

                                        <% form_tag '/search', :method => "get" do %>
                                        <%= text_field_tag("query", params['query'], :size => 30 )   %>
                                        <%= submit_tag  "Search" %>
                                        <% end%>
my groceries controller is this:

                       def search
                        @grocery = Grocery.search params[:query], {:page => params
[:page], :per_page => SEARCH_PAGE_NO}
                        end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.