title: Building a wiki like data model in rails question
body: <p>I have a data model in which I would like to have an item that has a description that can be edited. I would like to also keep track of all edits to the item. I am running into issues with my current strategy, which is:</p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
    has_one  :current_edit,
             :class_name =&gt; "Edit",
             :foreign_key =&gt; "current_edit_id"
    has_many :edits
  end
  
  class Edit &lt; ActiveRecord::Base
    belongs_to :item
  end
  </code></pre>
  
  <p>Can the Item have multiple associations to the same class like this?</p>
  
  <p>I was thinking that I should switch to keeping track of the edit version in the Edit object and then just sorting the <code>has_many</code> relationship base on this version.</p>