title: has_one association with optional: true?
body: <p>In a simple booking app:</p>
  <ul>
  <li>When user selects a seat, a <code>TempAppointment</code> is created.</li>
  <li>After the seat has been paid for, an Appointment is created based off the info in the TempAppointment record.</li>
  </ul>
  <p>The Appointment record cannot be created first, since the passenger may not pay, in which case the TempAppointment stays as-in, and an associated Appointment record never gets created.</p>
  <p>My natural thinking is that a TempAppointment has_one Appointment (which works), <strong>but when I add <code>optional: true</code>, I see errors</strong>:</p>
  <pre class="lang-rb prettyprint-override"><code>class TempAppointment &lt; ApplicationRecord
    has_one :appointment, optional: true 
  end
  </code></pre>
  <p>try to create a new TempAppointment</p>
  <pre><code>ta = TempAppointment.new(cruise_id: 1, passenger_id: 1, start_time: start_time, end_time: start_time + 3600)
  ArgumentError: Unknown key: :optional. Valid keys are: :class_name, :anonymous_class, :foreign_key,
   :validate, :autosave, :foreign_type, :dependent, :primary_key, :inverse_of, :required, :as, :touch
  </code></pre>
  <p>Why can't <code>has_one</code> work with <code>optional: true</code>?</p>