title: Ruby On Rails: make radio button default selected first time
body: <p>I am new to RoR. I want to know how do we make a radio button default selected just first time while creating new record?</p>
  
  <p>I tried</p>
  
  <pre><code>&lt;%= radio_button_tag 'scheduler', 'now', true%&gt; Now &lt;br&gt;
  &lt;%= radio_button_tag 'scheduler', 'future'%&gt; Future&lt;br&gt; 
  </code></pre>
  
  <p>It makes the first radio button (having value Now) checked but when i select second radio button (Future) and leave other mandatory fields blank on the form then again the first radio become selected instead of second. </p>
  
  <p>How to resolve this.</p>
  
  <p><strong>Note:</strong> the field "scheduler" is just a virtual field on this form that will display another HTML containing a datetimepicker if "Future" option is selected and that datetimepicker field "schedule_date" is the actual field of the model. If option "Now" is posted then simply it will save the current date and time into the database table for that field "schedule_date". So i just have to show/hide an HTML by using these radio buttons.</p>