title: Many To Many Polymorphic?
body: <p>In my app, I have many "Sites", and I have multiple user types like "Patient", "Provider", "Nurse", "Administrator", etc. </p>
  
  <pre><code>class Patient
    has_many :sites
  end
  
  class Provider
    has_many :sites
  end
  
  #etc user models...
  
  class Site &lt; ApplicationRecord
    # I don't want to have to name every user model here...
    has_many :patients
    has_many :providers
    has_many :nurses
    # etc. user models...
  end
  </code></pre>
  
  <p>What I would like to do, is have it so that each user type can have many sites, and each site can have many of each user type, <strong>but I don't want to do the following because the user type models may increase exponentially...</strong></p>
  
  <p>I thought maybe I could do a polymorphic relationship, but this doesn't satisfy the many_to_many relationship.</p>