title: Made a complicated form, messed up structuring the submitted params hash and I can't fix it
body: <p>This occurs when I try and submit some quiz answers:
  <a href="https://i.stack.imgur.com/BRIHF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BRIHF.png" alt="enter image description here"></a></p>
  
  <p>I'm pretty new to rails, I've been at this for a while but I don't know what I missed. I THINK it's just the way I set up my form because if I just try and save the name of the survey it works fine. 
  surveys/show.html.erb (I use @survey to grab survey data such as questions and answers).</p>
  
  <pre><code>&lt;%= form_for(:submitted_survey, url: submitted_surveys_path) do |f| %&gt;
  
  &lt;%= f.hidden_field :name, value: @survey.name %&gt;
  
  &lt;%= f.fields_for :submitted_questions do |ff| %&gt;
  
  &lt;% @questions.each do |question| %&gt;
  &lt;ul&gt; 
  
  &lt;%= ff.hidden_field :content, value: question.content %&gt;
  &lt;%= ff.label question.content %&gt;
  
  &lt;%= ff.fields_for :submitted_answers do |fff| %&gt;
  
  &lt;% question.answers.each do |answer| %&gt;
  
  &lt;%= fff.hidden_field :content, value: answer.content %&gt;
  
  &lt;%= fff.label answer.content %&gt;
  
  &lt;%= ff.radio_button(:user_answer, answer.content) %&gt;
  
  
  &lt;% end #questions.answers.each do %&gt;
  &lt;% end #fields_for answers %&gt;
  
  &lt;%= ff.hidden_field :question_explanation, value: question.question_explanation %&gt; 
  
  &lt;/ul&gt;
  
  &lt;% end #@questions.each do %&gt;
  
  &lt;% end #fields_for questions %&gt; 
  
  &lt;%= f.submit %&gt;
  &lt;% end #form_for%&gt; 
  </code></pre>
  
  <p>In my surveys controller:</p>
  
  <pre><code>  def show
      @survey = Survey.find(params[:id])
      @questions = @survey.questions
      @submitted_survey = current_user.submitted_surveys.build if logged_in?
  
    end
  </code></pre>
  
  <p>user.rb:</p>
  
  <pre><code>has_many :submitted_surveys, :dependent =&gt; :destroy
  has_many :submitted_questions, through: :submitted_surveys
  has_many :submitted_answers, through: :submitted_questions
  accepts_nested_attributes_for :submitted_surveys, :reject_if =&gt; -&gt; (a) {a[:content].blank? }, :allow_destroy =&gt; true
  </code></pre>
  
  <p>My models and associations:</p>
  
  <pre><code>class SubmittedSurvey &lt; ActiveRecord::Base
       belongs_to :user
       has_many :submitted_questions, :dependent =&gt; :destroy
      accepts_nested_attributes_for :submitted_questions, :reject_if =&gt; -&gt; (a) {a[:content].blank? }, :allow_destroy =&gt; true
  end
  
  class SubmittedQuestion &lt; ActiveRecord::Base
      belongs_to :submitted_survey
       has_many :submitted_answers, :dependent =&gt; :destroy
      accepts_nested_attributes_for :submitted_answers, :reject_if =&gt; -&gt; (a) {a[:content].blank? }, :allow_destroy =&gt; true
  end
  
  class SubmittedAnswer &lt; ActiveRecord::Base
      belongs_to :submitted_question
  end
  </code></pre>