I cannot figure out how to do this in rails 3.0. I have a controller, products and a search action, and in routes.rb I tried
resources :products, :collection => {:search => :post }
and
match 'products/search' => 'products#search', :via => [:get, :post]
and many other settings, but whenever I access products/search , I still get an error message indicating that the Product with id, search could not be found for the show action. Does anyone know what I'm doing wrong?
Thanks.
ruby ruby-on-rails ruby-on-rails-3
user508546
source share