0
레일 경로에서 제품 /에서 숍 /에 대한 모든 경로를 변경 내가 FOLL 항목이 있습니다. 잘 모르겠지만 :path=>:eshop
을 사용할 수 있습니다. eshop/get_products,eshop/buy_this
... 등과 같은 하위 경로에도 적용됩니까?내 routes.rb 3
레일 경로에서 제품 /에서 숍 /에 대한 모든 경로를 변경 내가 FOLL 항목이 있습니다. 잘 모르겠지만 :path=>:eshop
을 사용할 수 있습니다. eshop/get_products,eshop/buy_this
... 등과 같은 하위 경로에도 적용됩니까?내 routes.rb 3
경로를 수정하고 터미널에서 레이크 경로를 실행하여 경로를 확인할 수 있습니다. 응용 프로그램 내 모든 경로 도우미를 유지하는 점은 무엇입니까 :
resources :products, :path => 'eshop', :as => 'eshop' do
get 'get_products', :on => :collection
get 'show_product_details',:on=>:member
get 'buy_this',:on=>:collection
get 'search_product',:on=>:collection
end
는`as` 옵션 조언의 좋은 조각되지 않습니다 추가이
get_products_eshop_index GET /eshop/get_products(.:format) products#get_products
show_product_details_eshop GET /eshop/:id/show_product_details(.:format) products#show_product_details
buy_this_eshop_index GET /eshop/buy_this(.:format) products#buy_this
search_product_eshop_index GET /eshop/search_product(.:format) products#search_product
eshop_index GET /eshop(.:format) products#index
POST /eshop(.:format) products#create
new_eshop GET /eshop/new(.:format) products#new
edit_eshop GET /eshop/:id/edit(.:format) products#edit
eshop GET /eshop/:id(.:format) products#show
PUT /eshop/:id(.:format) products#update
DELETE /eshop/:id(.:format) products#destroy
를 생성합니다? – apneadiving
덕분에 @ santosh ..하지만 이미 사용되는 많은 URL 헬퍼가 있습니다. 예를 들어'buy_this_products_path'와 같이 replae를하고 싶지 않습니다. 그리고 새로 생성 된 URL 도우미를 work.dat로 변경해야합니다. 원하지 않습니다. –