title: Create multiple entries in model through nested form via simple_form
body: <p>When a user creates a vacancy I want them to be able to save either 1 range of dates or multiple separate dates.</p>
  
  <p>So I have 2 models, <code>Vacancy</code> and <code>Vacancyschedule</code>.</p>
  
  <p>Vacancyschedule includes <code>vacancy_id start_date end_date start_hour end_hour (to save a range)</code> and when it is multiple seperate dates, I just want to leave the <code>end_date</code> empty and have multiple entries and combine them through my <code>vacancy_id</code>.</p>
  
  <p>This is my code in my view:</p>
  
  <pre><code>... other code to ask for vacancy params, nothing special, nothing broken ...
  
  #Code to create entry in vacancyschedule
      &lt;%= t.simple_fields_for :vacancyschedule do |p| %&gt;
         &lt;%= p.input :start_date, :as =&gt; :date_picker, :label =&gt; false%&gt;
         &lt;%= p.input :start_hour, as: :time, default: Time.parse('09:00')%&gt;
         &lt;%= p.input :end_hour, as: :time, default: Time.parse('17:00')%&gt;
      &lt;% end %&gt;
  </code></pre>
  
  <p>And then I have some javascript that adds another exact copy one of those blocks when a user wants to add a second seperate date.</p>
  
  <p>Now for my question:</p>
  
  <p><strong>The format in which they are passed is very strange. As you can see I ask for :start_date, :start_hour and :end hour and this is what I get:</strong></p>
  
  <pre><code>{"name"=&gt;"", "street"=&gt;"", "description"=&gt;"", "skill_id"=&gt;"",
  "jobtype_id"=&gt;"", "wage"=&gt;"", "vacancyschedule"=&gt;
  {"start_date"=&gt;"27/10/15", "end_date"=&gt;"", "start_hour"=&gt;"", 
  "end_hour"=&gt;"", "start_hour(1i)"=&gt;"2015", "start_hour(2i)"=&gt;"10",
   "start_hour(3i)"=&gt;"26", "start_hour(4i)"=&gt;"21", 
  "start_hour(5i)"=&gt;"00", "end_hour(1i)"=&gt;"2015", "end_hour(2i)"=&gt;"10",
   "end_hour(3i)"=&gt;"26", "end_hour(4i)"=&gt;"17", "end_hour(5i)"=&gt;"00"}, 
  "vacancyscheduele"=&gt;{"start_date"=&gt;"", "start_hour(1i)"=&gt;"2015", 
  "start_hour(2i)"=&gt;"10", "start_hour(3i)"=&gt;"26", "start_hour(4i)"=&gt;"09",
  "start_hour(5i)"=&gt;"00", "end_hour(1i)"=&gt;"2015", "end_hour(2i)"=&gt;"10",
  "end_hour(3i)"=&gt;"26", "end_hour(4i)"=&gt;"17", "end_hour(5i)"=&gt;"00"}, 
  "tag_list"=&gt;""}, "radio"=&gt;"on", "commit"=&gt;"Create Vacancy", 
  "controller"=&gt;"vacancies", "action"=&gt;"create", "employer_id"=&gt;"2"}
  </code></pre>
  
  <p>From what I can see is that they are passed in very different variables and incomplete (not all dates are passed).</p>
  
  <p>Does anyone have any experience with this issue? How would I either grab these elements or how do I prevent them from being pushed in that format?</p>