2011-03-02 15 views
0
class StepQuiz < ActiveRecord::Base 
    belongs_to :step 
    has_many :step_quiz_questions, :dependent => :destroy 

    accepts_nested_attributes_for :step 
    accepts_nested_attributes_for :step_quiz_questions, :allow_destroy => true 
    attr_accessible :step_id, :instructions, :correct_to_pass, :retakes_allowed, :time_limit, :step_attributes, :step_quiz_questions_attributes 
end 

私は与えられたモデルに対して2回呼び出されるaccepts_nested_attributes_forを許可しました。エラーなしで動作するように見えます。あなたがここで定義されたクラスのメソッドを使用しているaccepts_nested_attributes_forがモデルで2回呼び出されました

答えて