searching a record

I have a table called project. I want to make a search window to search particuler project details when I enter the project name. I have done followings.

create a project controller and insert

def search   @project = Project.find_by_name(params["x"]) end

then create a view for the searching window as follows( inside project directory)

<% form_tag(:controller => "projcet" , :action => "search") do %>

<%= text_field_tag "x" %>   <%= submit_tag %> <% end %>

then I create a seacrh.html.rb inside the project directory and insert

<% if @project.empty? %>   No project found <% else %>   <% @project.each do |project| %>     <%= link_to project.name, project_url(project)%>     <br />   <% end %> <% end %>

then I click the seach button i'm gettin following error

Routing Error

No route matches "/projcet/search" with {:method=>:post}

I WOULD MUCH APPRECIATE if any one can help me to solve this..

Hi...

I have a table called project.

Shouldn't the table name be plural, "projects" ?

<% form_tag(:controller => "projcet" , :action => "search") do %>

projcet != project ?

Craig White wrote:

Hi...

then create a view for the searching window as follows( inside project directory)

<% form_tag(:controller => "projcet" , :action => "search") do %>

---- ^^^^^^^ try fixing this typo ^^^^^^^ ----

  <% @project.each do |project| %>

I WOULD MUCH APPRECIATE if any one can help me to solve this..

---- Craig

-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

HI CRAIG and DONALD,

I CHANGED THE CTROLLERNAME TO project but still i'm getting the same error. PLEASE HELP ME.