title: unable to make the model it belongs to also be one that can has_many
body: <p>I'm struggling when it comes to having a joint table, which is also polymorphic and has many to many.</p>
  
  <p>It's setup in a way that a question belongs to a company. A question can belong to a user, group or company through question_participants (polymorphic / joint).</p>
  
  <p>Now I am able to save both users and groups but not company when they select that. I think it has to do with the confusion of it being the owner.</p>
  
  <pre><code># ask question
  class QuestionsController &lt; ApplicationController
  
  
    def new
      @question = current_user.company.questions.new
    end
  
    private
  
    def question_params
      params.require(:question).permit(:name, :optional,
                                       user_ids: [], group_ids: [])
    end
  
  
  # company users belong to
  class Company &lt; ActiveRecord::Base    
    has_many :questions
  end
  
  
  # questions created by admin
  class Question &lt; ActiveRecord::Base
    belongs_to :company
    has_many :question_participants
    has_many :answers
    has_many :users, through: :question_participants,
                     source: :questionable, source_type: 'User'
    has_many :groups, through: :question_participants,
                      source: :questionable, source_type: 'Group'
    has_many :companies, through: :question_participants,
                         source: :questionable, source_type: 'Company'
  end
  </code></pre>
  
  <p>and the form field:</p>
  
  <pre><code>&lt;%= form_for @question do |f| %&gt;
  
      &lt;%= f.label :group_ids %&gt;
      &lt;%= f.collection_select :group_ids, current_user.company.groups.order(:name), :id, :name, {},
        { multiple: true } %&gt;
  
      &lt;%= f.label :user_ids %&gt;
      &lt;%= f.collection_select :user_ids, current_user.company.users.order(:first_name), :id, :first_name, {},
      { multiple: true } %&gt;
  
      &lt;%= f.label :name %&gt;
      &lt;%= f.text_field :name, class: "form-control" %&gt;
  
  
    &lt;%= f.submit class: "btn btn-success" %&gt;
  
  &lt;% end %&gt;
  </code></pre>