easy way to get the route is to do an index_action :search before your
search controller definition

On May 4, 12:07 am, blueHandTalking <[email protected]> wrote:
> Using the following form for a search with Sphinx, Thinking  Sphinx
> gem:
>
> <form   action="/users/search" method="get"  update="searchresults">
>         <input id="search" type="text" name="search"  />
>         <submit id="searchsubmit" label="SEARCH" />
> </form>
>
> ... in user.rb
>
>   # Sphinx Index
>   define_index do
>     indexes house_interest, :sortable => true
>     indexes category
>     indexes contact_id
>     indexes email_address
>   end
>
> def view_permitted?(field)
>     true
> end
>
> ...and in the Users Controller,
>
> def search
> �...@clients = User.search params[:search], :conditions => {:category
> => :client}
>   respond_to do |wants|
>      wants.html
>      wants.js
>   end
> end
>
> ... in search.rjs
>
>    page[:searchresults].replacehtml :partial => 'search', :object =>
> @clients
>
> ...and in _search.dryml
>
>    <% if @clients == nil %>
>         <p> clients is nil </p>
>    <% else %>
>         <% for client in @clients %>
>                 <%= client.house_interest %>
>    <% end %>
>
> I am getting a 'page not found' error.
>
> I do not have any routes set up for this, but thought default should
> handle it.
>
> Cheers,
>
>    Jet
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Hobo Users" 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 
> athttp://groups.google.com/group/hobousers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to