# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
resource中有member和collection,如果访问路径将是带id的,那么就要选用member策略,反之就选取collection策略。
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
resource中有member和collection,如果访问路径将是带id的,那么就要选用member策略,反之就选取collection策略。