New method to controller being recognized as parameter instead

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.


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

Changes I have made so far are:

map.search_product ‘/products/search’, :controller =>
‘products’, :action => ‘search’

Am I missing any setups?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs