# New method to controller being recognized as parameter instead

**URL:** <https://www.ruby-forum.com/t/new-method-to-controller-being-recognized-as-parameter-instead/173836>\
**Category:** Rails\
**Created:** [August 16, 2009, 10:09am UTC](https://www.ruby-forum.com/t/new-method-to-controller-being-recognized-as-parameter-instead/173836 "2009-08-16T10:09:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryokamiya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@ryokamiya](https://www.ruby-forum.com/u/ryokamiya)\
**Post date:** [August 16, 2009, 10:09am UTC](https://www.ruby-forum.com/t/new-method-to-controller-being-recognized-as-parameter-instead/173836/1 "2009-08-16T10:09:31Z")

</div>

I’m trying to add original method “search” to the scaffolded  
controller. All the default standard methods in the controller (i.e.  
index, show, new, etc…). However, additional method “seach” is not  
recognized as method, and rather rails take the request as parameter  
with the following error message.

url: [http://127.0.0.1:3000/products/search](http://127.0.0.1:3000/products/search)

ActiveRecord::RecordNotFound in ProductsController#show  
Couldn’t find Product with ID=search

Changes I have made so far are:

routes.rb  
map.search\_product ‘/products/search’, :controller =\>  
‘products’, :action =\> ‘search’

Am I missing any setups?
