2011-12-31 67 views
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?

感謝

回答

3

更換<% form_for<%= form_for

+0

謝謝!我實際上是從Rails 2遷移過來的。有很多像這樣的小東西! :) – valk 2011-12-31 14:14:02