Hi...

On Fri, 2010-03-26 at 03:44 +0100, Nipuna Weerasinghe wrote:
> 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 %>
----                          ^^^^^^^
try fixing this typo          ^^^^^^^
----
> 
>  <%= 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..
----
Craig


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

-- 
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