20
, :on => :collection
'un ne anlama geldiğini belirtmez.Raylar yönlendirme -: on =>: toplama
:on
anahtarının ne olduğunu ve bu bağlamda ne :collection
olduğunu açıklayamıyorum.
, :on => :collection
'un ne anlama geldiğini belirtmez.Raylar yönlendirme -: on =>: toplama
:on
anahtarının ne olduğunu ve bu bağlamda ne :collection
olduğunu açıklayamıyorum.
Koleksiyondaki yollar here adresinde listelenmiştir.
:on => :collection
ve :on => :member
arasındaki fark, ürettikleri yolun stilleri ve ilişkili yol yardımcılarıdır.
resources :posts do
# on collection
get 'search', on: :collection
# --> generates '/posts/search' and search_posts_path
# on member
get 'share', on: :member
# --> generates'/posts/:id/share' and share_photo_path(@post)
end