Rails 3.1로 업그레이드 한 이후로 사이트 라우팅에 문제가 있습니다. 이전 레일 3.0, 내 라우터 설정에서이 작업을 수행 할 수 있었다 :Rails 3.1에서 사이트 루트를 라우팅 할 때 No (. : format).
resources :quotes, :path => ""
root :to => "quotes#index"
내가 원하는 것입니다 GET /(.:format)
하며, 같은 날 경로를 줄 것이다 이후 내 QuotesController
도 반환 할 수있는 데이터의 index
활동 JSON, XML 및 ATOM에서
이제 Rails 3.1로 업그레이드 한 이후 경로가 GET /
과 같이 표시되었습니다. (.:format)
이 없어지고 /.atom
URL에 액세스하려는 시도가 더 이상 작동하지 않습니다. 이 기능을 다시 얻으려면 어떻게해야합니까?
편집 : "나는이 아마 레일 팀이 같은 URL을 억제하기 위해 의도적으로 한 일이라고 결정했습니다,
about_quotes GET /about(.:format) {:action=>"about", :controller=>"quotes"}
top_quotes GET /top(.:format) {:action=>"top", :controller=>"quotes"}
random_quotes GET /random(.:format) {:action=>"random", :controller=>"quotes"}
search_quotes GET /search(.:format) {:action=>"searchform", :controller=>"quotes"}
POST /search(.:format) {:action=>"search", :controller=>"quotes"}
nonsense_quotes GET /nonsense(.:format) {:action=>"nonsense", :controller=>"quotes"}
tags_quotes GET /tags(.:format) {:action=>"tags", :controller=>"quotes"}
tag_quotes GET /tags/:id(.:format) {:action=>"tag", :controller=>"quotes"}
stats_quotes GET /stats(.:format) {:action=>"stats", :controller=>"quotes"}
up_quote GET /:id/up(.:format) {:action=>"up", :controller=>"quotes"}
down_quote GET /:id/down(.:format) {:action=>"down", :controller=>"quotes"}
quotes GET / {:action=>"index", :controller=>"quotes"}
POST / {:action=>"create", :controller=>"quotes"}
new_quote GET /new(.:format) {:action=>"new", :controller=>"quotes"}
edit_quote GET /:id/edit(.:format) {:action=>"edit", :controller=>"quotes"}
quote GET /:id(.:format) {:action=>"show", :controller=>"quotes"}
PUT /:id(.:format) {:action=>"update", :controller=>"quotes"}
DELETE /:id(.:format) {:action=>"destroy", :controller=>"quotes"}
root / {:controller=>"quotes", :action=>"index"}
'RAKE 경로 CONTROLLER = quotes'의 결과는 무엇입니까? – Bohdan
요청한 정보로 질문을 편집했습니다. – hatkirby
시도해 보셨습니까 : format => true? 여기 엉덩이에서 단지 쏜다. –