title: has_one :through doesn't provide build_association
body: <p>A TimeLog can either be Invoiced or not, and an Invoice contains many TimeLogs. Our database can't have nullable foreign keys, so we're using a join model. The code:</p>
  
  <pre><code>class TimeLog &lt; ActiveRecord::Base
    has_one :invoices_time_logs
    has_one :invoice, through: :invoices_time_logs
  end
  
  class Invoice &lt; ActiveRecord::Base
    has_many :invoices_time_logss
    has_many :time_logs, through: :invoices_time_logss
  end
  
  class InvoicesTimeLogs
    belongs_to :invoice
    belongs_to :time_log
  end
  </code></pre>
  
  <p>Invoice.first.time_logs.build works fine, but TimeLog.first.build_invoice gives</p>
  
  <blockquote>
    <p>NoMethodError: undefined method `build_invoice' for
    #&lt;TimeLog:0x4acd588&gt;</p>
  </blockquote>
  
  <p>Isn't has_one supposed to make the build_association method available?</p>
  
  <p>Update:</p>
  
  <p>I've made a sample repo for this question: <a href="https://github.com/shlevy/build_association_test" rel="nofollow">build_assocation_test</a>. To see the problem, clone the repo, install the bundle, run the migrations (or load the schema), and then in a rails console:</p>
  
  <pre><code>Invoice.create
  Invoice.first.time_logs.build
  TimeLog.create
  TimeLog.first.build_invoice
  </code></pre>