title: Rails: belongs_to vs has_one
body: <p>A bit of a newbie question on rails associations.</p>
  
  <p>I have a Bug model, and a Status model. Status is basically just a key/value pair table. Out of the choices available, I would say Bug has_one Status makes the most sense. However, according to <a href="http://duanesbrain.blogspot.com/2006/05/ruby-on-rails-hasone-versus-belongsto.html" rel="noreferrer">this</a></p>
  
  <blockquote>
    <p>Content belongs_to ContentTemplate. Go
    back and look at how I described the
    problem, and you'll see that it works.
    With belongs_to, the table accepts
    responsibility for the foreign key. So
    Content has a content_template_id. And
    ContentTemplate doesn't need anything.
    I can point to it at will. Done.</p>
  </blockquote>
  
  <p>Bug belongs_to Status would be more appropriate (since Bug should take the foreign key). Semantically, his example makes sense, but mine makes none. Is this just a quirk of rails where in this situation it looks odd, or am I not understanding something/doing it wrong?</p>