Newbie: Searcing database via user form input?

First, it looks to me like you're attempting to do exactly what Ryan Bates shows in episode #37 of Railscasts:

Second: What's this?

<% form_tag({ :action => "index", :controller => "users" }, :method => "index") do %>

There is no "index" method in HTTP. This should be one of :get or :post in the context of an HTML form.

Robert Walker wrote:

First, it looks to me like you're attempting to do exactly what Ryan Bates shows in episode #37 of Railscasts:

#37 Simple Search Form - RailsCasts

Second: What's this?

<% form_tag({ :action => "index", :controller => "users" }, :method => "index") do %>

There is no "index" method in HTTP. This should be one of :get or :post in the context of an HTML form.

On May 28, 8:24�am, Dale Cunnigham <rails-mailing-l...@andreas-s.net>

Ok so I followed the instructions in that rails cast (thanks for that, really great resource) but I'm now getting a routing/path problem...

ActionController::RoutingError in Users#index

Showing users/index.html.erb where line #9 raised:

user_url failed to generate from {:action=>"show", :controller=>"users"} - you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following required parameters: ["users", :id] - are they all satisfied?

Extracted source (around line #9):

6: 7: <td align='left'> 8: 9: <% form_tag user_path, method => 'get' do %> 10: <p> 11: <%= text_field_tag :search, params[:search] %> 12: <%= submit_tag "Search Users", :name => nil %>

so it looks like it cant render user_path to an appropriate url.

My routes.rb file does contain

ActionController::Routing::Routes.draw do |map|   map.resources :users

So I thought user_path would be generated by that line automatically, and then the page gets routed to the 'index' action automatically no?