title: Structuring Complex Relationships in Mongoid
body: <p>Say I have two seperate models User and Event in a HABTM environment.</p>
  
  <p>Now I want to extend this to include information about the relation. Things like if the user is planning on attending the event. </p>
  
  <p>In standard ActiveRecord this would be done with a has_many :through relationship, but from what I have been reading it is a bad idea to try and create this kind of relationship in mongoid. What is a good way to approach this problem? (staying with mongo)</p>
  
  <p>Here's an example of what I would expect for this type of functionality:</p>
  
  <pre><code>class User
    field :name
    has_many :user_events
    has_many :events, :through =&gt; :user_events
  end
  
  class Event
    field :title 
    has_many :user_events
    has_many :users, :through =&gt; :user_events
  end
  
  class UserEvent
    field :attending?, :type =&gt; Boolean
    belongs_to :users
    belongs_to :events
  end
  </code></pre>