我不完全明白爲什麼會發生這種情況,也許你們中的某些人做了......在這裏。 我創建了一個嵌套的資源: resources :order do
resources :ordered_vehicles
end
我添加了一個link_to的new行動,並通過了order.id像這樣new_order_ordered_vehicle_path(order.id)在頁面加載很好。問題出在我
我的Capapara RSPEC測試有一些困難,我有一個嵌套的資源。這裏的錯誤我收到: 1) Photo pages visit photo path Photo can be visited after FactoryGirl create records ←[31mFailure/Error:←[0m ←[31mvisit mountain_photo_path(mountain, photo
我有一個屬於許多不同模型的嵌套資源。例如: resources :users do
resources :histories, only: [:show]
end
resources :publications do
resources :histories, only: [:show]
end
resources :events do
resources
在Rails 3.2.11,我有以下路由定義 resources :foos do
resources :bars
resources :bangs, :controller => 'foos/bangs'
end
這導致以下路線 foo_bars GET /foos/:foo_id/bars(.:format) bars#index
POST /f
所以我就遇到了這個問題範圍的路線和的form_for:form_for and scopes, rails 3 我的問題更糟糕的是,雖然因爲我不只想範圍內的所有方法,我想大家是在除了GET「/管理員」 /節目。 所以我的routes.rb有這樣的事情: scope '/admin' do
resources 'lessons', except: [:show]
end
get "le