title: Multiple belongs_to in Rails 3.2
body: <p>I'm rather confused by the <code>belongs_to</code> associations in Rails when it comes to associating a comment with both the User and Page.  What I am saying is there a way to associate a comment with both the user and page?  Take the following (simple example that doesn't work for me but demonstrates):</p>
  
  <pre><code># The basic idea is that I would like to have User show comments from the user
  # on all pages, and Page show all the comments for the page.
  # User.find_by_email('email@domain.com').comments # Show comments on pages.
  # Page.find_by_slug('my-slug').comments # Show comments on the page.
  
  class Comments
    include Mongoid::Document and include Mongoid::Timestamps
    include MyApp::Mongoid::Patches::DefaultType
  
    belongs_to :page
    belongs_to :user
  
    field :content, type: String
  end
  
  class Page
    include Mongoid::Document and include Mongoid::Timestamps
    include MyApp::Mongoid::Patches::DefaultType
  
    belongs_to :user
    has_many :comments
  
    field :type, type: String, default: :post
    field :slug, type: String
    field :title, type: String
    field :content, type: String
    field :tags, type: Array, default: :user
  
    private
    # .....
  end
  
  class User
    include Mongoid::Document and include Mongoid::Timestamps
    include MyApp::Mongoid::Patches::DefaultType
  
    embeds_one :provider
    has_many :pages
    has_many :comments # But only from Pages not on the user.
  
    field :email, type: String
    field :name, type: String
    field :role, type: Symbol, default: :user
  end
  </code></pre>