i wonder what the difference is here:
resources :photos do
member do
get :preview
end
end
# vs
resources :photos do
collection do
get :search
end
end
im not sure i dont understand it.
thanks
i wonder what the difference is here:
resources :photos do
member do
get :preview
end
end
# vs
resources :photos do
collection do
get :search
end
end
im not sure i dont understand it.
thanks
A member route will require an ID, because it acts on a member. A collection route doesn't because it acts on a collection of objects. Preview is an example of a member route, because it acts on (and displays) a single object. Search is an example of a collection route, because it acts on (and displays) a collection of objects.