Rails 5 belongs_to_required_by_default doesn't work
<p>I use Rails 5.0.0, but for some reason <code>belongs_to_required_by_default</code> doesn't work!</p>

<p>Application was created as new rails 5 app</p>

<pre><code>class Visit &lt; ApplicationRecord
  belongs_to :user
end

&gt; v = Visit.new
&gt; v.valid? # =&gt; true
</code></pre>

<p>it works only with <code>optional: false</code> option</p>

<pre><code>class Visit &lt; ApplicationRecord
  belongs_to :user, optional: false
end

&gt; v = Visit.new
&gt; v.valid? # =&gt; false
</code></pre>

<p>but why doesn't work configuration:</p>

<pre><code>Rails.application.config.active_record.belongs_to_required_by_default = true
</code></pre>