title: Rails: has_one relationship that can be direct or require a :through
body: <p>In my rails app, I have a relationship that can be either a has_one or a has_one :through, and I'm not sure how to architect this.</p>
  
  <p>In other words, say I have the classes Foo, Bar, and Baz, the relationship between Foo and Baz could either be:</p>
  
  <pre><code>class Foo
    has_one :baz
  end
  
  class Baz
    belongs_to :foo
  end
  </code></pre>
  
  <p>OR it could be </p>
  
  <pre><code>class Foo
    has_one :bar
    has_one :baz, through: :bar
  end
  
  class Bar
    has_one :baz
    belongs_to :foo
  end
  
  class Baz
   belongs_to :bar
  end
  </code></pre>
  
  <p>Does anyone know what the best way is to manage both relationships?</p>