-1

什么是收藏,什么是会员?

resources :photos do
  member do
    get :preview
  end
end

对比

resources :photos do
  collection do
    get :search
  end
end
4

1 回答 1

0

第一个让你请求[GET]:

/photos/1/preview

# action 'preview' within PhotosController with params[:photo_id] == 1

第二个让你请求[GET]:

/photos/search

# action 'search' within PhotosController
于 2013-02-20T11:52:28.873 回答