Rails嵌套资源问题
我有一些资源,一个grant_application和一个与has_one相关的家庭
class GrantApplication :destroy end class Household < ActiveRecord::Base belongs_to :grant_application end
..我也使用以下路线..
map.resources :grant_applications do |grant| grant.resource :household end
但是,在尝试为/ grant_applications / 1 / household / new创建表单时,我遇到了实际问题
运用
返回错误:
undefined method 'grant_households_path' for #
有任何想法吗?
<% form_for(@household, :url => grant_application_household_path(@grant) ) do |f| %>