モデルがWineあり、ワインには多くのVarietals.
私はWineVarietalsモデルを持っており、そのテーブルを介してワインと品種を結合します。
accepts_nested_attributes_for :wine_varietalsモデル
を入れると、 No association found for namewine_varietals が得られます。まだ定義されていますか?
しかし、私は自分のモデルに関連付けを持っています。
私のワインモデルは
class Wine < ActiveRecord::Base
attr_accessible :name, :winery_id, :wine_varietals_attributes
accept_nested_attributes_for :wine_varietals
所属先:ワイナリー
has_many :wine_varietals
#has_and_belongs_to_many :varietals, :join_table => :wine_varietals
has_many :wine_photos
has_many :ヴィンテージ
WineVarietal と Varietal モデルもあります。
行をコメントアウトするaccepts_nested_attributes_forと、エラーはなくなります。
さまざまな形式の複数形を試しましたがwines_varietals、wine_varietalこのエラーを取り除くことができないようです。