It appears you don't have a corresponding route entry. You should have something like this in your routes.rb
:
resources :posts do
get :product_list, on: :collection
end
If you only specify resources :posts
, your GET request would match the one for GET /posts/:id
(look at the output of rake routes
), i.e. show
action of PostsController
with product_list
parsed as the id parameter in the request URI. get :product_list
defined after those 7 entries would make the router match the URI to the corresponding action and controller.