请你能解释一下这段代码是做什么的吗?
resources :products do
get :who_bought, :on => :member
end
完整的代码来自实用程序编程一书,但它没有解释为什么我们使用该代码,“:on =>:member”
Depot::Application.routes.draw do
resources :orders
resources :line_items
post 'line_items/decrease'
resources :carts
get "store/index"
resources :products do
get :who_bought, :on => :member
end
root :to => 'store#index', :as => 'store'
谢谢