title: Rails form params changing in controller
body: <p>I have a form:</p>
  
  <pre><code>&lt;%= form_for(:report_main, :url =&gt; {:action =&gt; 'exporttoxiccreate'}) do |f| %&gt;
  &lt;%= collection_select(:waste, :code, Waste.find_all_by_istoxic(false), :id, :code, :include_blank =&gt; '') %&gt;
  &lt;%= f.check_box(:q_pripadnost) %&gt;
  &lt;%= f.text_field(:amount) %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and this code in controller:</p>
  
  <pre><code>def exporttoxiccreate
      @report = ReportMain.new
      @reportexport = ReportExport.new
      @reportparam = params[:report_main]
  
      @report.waste_id = @reportparam.waste.code
      @report.amount = @reportparam.amount
  
      if @report.save
        @reportexport.report_main_id = @report.id
      else
        redirect_to(:action =&gt; 'exporttoxicnew')
      end
  
      @reportexport.q_pripadnost = @reportparam.q_pripadnost
  
      if @reportexport.save
        redirect_to(:action =&gt; 'show', :id =&gt; @reportexport.id)
      else
        redirect_to(:action =&gt; 'exporttoxicnew')
      end
    end
  </code></pre>
  
  <p>I want to save in two tables, in two objects data from this form, and I need to separate params to manipulate with. I tried with this:</p>
  
  <pre><code>@reportexport.q_pripadnost = @reportparam.q_pripadnost
  </code></pre>
  
  <p><strong>I want to set q_pripadnost field in @reportexport with some value from param.</strong></p>
  
  <p><strong>Where I make mistake?</strong></p>