0
のRails 3には、何らかの理由でコメントフォームをレンダリングすることができない、形式は次のとおりです。コメントフォームがレンダリングすることができません
<% form_for ([@post.eng_post, @post.eng_post.eng_comments.build]) do |f| %>
しかし
<%= debug @post.eng_post.eng_comments.build %>
--- !ruby/object:EngComment
attributes:
id: !!null
eng_post_id: 97
full_name: !!null
website: !!null
email: !!null
comment: !!null
created_at: !!null
updated_at: !!null
を与えますモデルは次のように構成されています。
Posts (have one)-> EngPost (has many)-> EngComments
(より詳細なモデルがここにRails 3, comments in a nested form, wrong routes?ある)
おかげ
で
<% form_for
を交換してください!私は実際にレール2から移行しています。このような小さなものがたくさんあります! :) – valk