title: How to properly allow nil in rails
body: <p>In my rails app my bands have many events. In the view of the bands it can show what events they have. My problem is if a new band is created it will throw an error in the view because it does not have an event. </p>
  
  <p>I was reading about allow_nil and I wanted to use it in my bands model but Im not sure how to implement it. The documentation on it is pretty dry and not really helpful </p>
  
  <pre><code>class Band &lt; ApplicationRecord
      has_many :events :allow_nil true
  end
  </code></pre>
  
  <p>Im not sure if the above way to do it is correct.</p>