什么是集合,什么是成员?
resources :photos do
member do
get :preview
end
end
resources :photos do
collection do
get :search
end
end
答案 0 :(得分:0)
第一个让你请求[GET]:
/photos/1/preview
# action 'preview' within PhotosController with params[:photo_id] == 1
第二个让你请求[GET]:
/photos/search
# action 'search' within PhotosController