0
我有一個名爲飛機的模型,屈指可數,它是 驅使我堅果。在Rails 3「beta 4」中處理這個問題的正確方法是什麼?如何在使用Rails 3的資源路徑中使用不可數名詞?
resources :aircraft do
member do
get :flights
end
end
# Of course these work for some actions and not others.
match 'aircraft', :to => 'aircraft#index', :as => :aircraft
match 'aircraft/:id', :to => 'aircraft#show', :as => :aircraft_instance
它曾經是這樣的。現在{「singular」=>:aircraft_instance}顯示在請求參數中。是...請求參數,就像我用瀏覽器提交它們一樣。 – 2010-07-09 23:03:35
用新信息更新答案。 – nfm 2010-07-10 01:19:35