Hi,

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:

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

<table>
 <tr>
  <td><label for="search"><font size="1"><b>Name:</b></font></label></
td>
  <td><%= text_field_tag :search_name, params[:search_name]%>
      <%= submit_tag "Search", :name=> nil %></td>
</tr>
</table>

<%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
model)

def people_search
    @people_tree_searches = PeopleTreeV.search(params[:search_name])
  end
end

any pointers are appreciated



thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to