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.. -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, Mar 25, 2010 at 9:44 PM, Nipuna Weerasinghe <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have a table called project.Shouldn''t the table name be plural, "projects" ?> <% form_tag(:controller => "projcet" , :action => "search") do %>projcet != project ?> No route matches "/projcet/search" with {:method=>:post}-- Greg Donald destiney.com | gregdonald.com -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Craig White wrote:> Hi... > > On Fri, 2010-03-26 at 03:44 +0100, Nipuna Weerasinghe wrote: >> 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. -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.