rendering a result from a different controller


I am a bit new at rails, so I'm not sure how to approach this:

I have a view with a search box that calls a controller/model outside
of the view. So the view I am working with is called 'groups' and I
make a search to people, in another controller. I'd like the result
of the search to get sent back to my view under groups.

Here's what I have in the view:

<% form_tag ({ :controller=> 'people', :action=> 'index'}, :method=>
'get') do %>

  <td><label for="search"><font size="1"><b>Name:</b></font></label></

  <td><%= text_field_tag :search_name, params[:search_name]%>
      <%= submit_tag "Search", :name=> nil %></td>

<%end %>

So instead of the result rendering in index under 'people', I'd like
to get the array back and render a list of people in groups. I tried
working with partials, but the issue is I need to get the array back
into this view, so I can pass it to a partial.

My controller code in people looks like this (I put the logic in the

def people_search
    @people_tree_searches =[:search_name])

any pointers are appreciated



     You can look at :collection This is likein your routes.rb you can

map.resources :people, :collection => {:search => :any}

    I am assuming map.resources :people is already there
Now you can have a method search in people controller and the
corresponding view may/maynot in view/people


thanks, I will give this a try. Just out of curiosity, will I be able
to add functionality to the partial?