Ruby on rails Rails 3.1rc5索引路径未定义方法

Ruby on rails Rails 3.1rc5索引路径未定义方法,ruby-on-rails,forms,nested,Ruby On Rails,Forms,Nested,我被这张愚蠢的表格挡住了: 我有m-n关系: class Elementtype < ActiveRecord::Base has_many :elementtypeproperties class Propertytype < ActiveRecord::Base has_many :elementtypeproperties class Elementtypeproperties < ActiveRecord::Base belongs_to :el

我被这张愚蠢的表格挡住了:

我有m-n关系:

class Elementtype < ActiveRecord::Base

  has_many :elementtypeproperties

class Propertytype < ActiveRecord::Base

  has_many :elementtypeproperties


class Elementtypeproperties < ActiveRecord::Base

  belongs_to :elementtype
  belongs_to :propertytype
class Elementtype
我创建了这个表单:

<%= simple_form_for @elementtypeproperty  do |form| %>


    <%=form.collection :elementtype_id%>
    <%=form.collection :propertytype_id%>

    <%= form.button :submit %>



<% end %>

此视图中包括:

<h1>New elementtypeproperty</h1>

<%= render 'form' %>

<%= link_to 'Back', elementtypeproperties_path %>
newelementtypeproperty
当我尝试打开页面时,我收到以下消息:

ActionView::Template::Error (undefined method `elementtypeproperties_index_path' for #<#<Class:0x000001010b51d8>:0x000001010a5fa8>):
    1: <%= simple_form_for @elementtypeproperty  do |form| %>
    2: 
    3: 
    4:     <%=form.collection :order_id%>
  app/views/elementtypeproperties/_form.html.erb:1:in `_app_views_elementtypeproperties__form_html_erb__3568906133403572328_2153973000'
  app/views/elementtypeproperties/new.html.erb:3:in `_app_views_elementtypeproperties_new_html_erb__1519898890038681767_2154367600'
  app/controllers/elementtypeproperties_controller.rb:29:in `new'
ActionView::Template::Error(未定义的#方法'elementtypeproperties_index_path'):
1: 
2: 
三:
4:     
app/views/elementtypeproperties/_-form.html.erb:1:在`_-app\u-views\u-elementtypeproperties\u-form\u-html\u-erb\u 3568906133403572328\u 2153973000'中
app/views/elementtypeproperties/new.html.erb:3:in`_app_views_elementtypeproperties_new_html_erb_1519898890038681767_2154367600'
app/controllers/elementtypeproperties_controller.rb:29:in'new'

怎么了?谢谢

解决了,由于迁移中的一个错误,我的模型是复数的。

如果您为您提出的问题标记已接受的答案,您会发现人们更愿意帮助您。对不起,我不知道。完成了。谢谢你的信息。没问题,很高兴你的问题解决了。