title: Authorizing an array of ID's with the Pundit gem
body: <p>I have a multiple select box for a has_many association. The params come in as:</p>
  
  <pre><code>foo_ids: ["1", "2", "3"]
  </code></pre>
  
  <p>Using strong parameters, I do not permit this attribute because I would like to authorize it myself so people cannot just put whatever they want in it.</p>
  
  <pre><code>def update
    bar.foos = authorized_foos
    bar.update(baz_params)
    respond_with bar
  end
  
  private
  
    def authorized_foos
      foos = Foo.find(params[:baz][:foo_ids])
      foos.each do |foo|
        authorize foo, :manage?
      end
    end
  </code></pre>
  
  <p>This approach is going to force me to find all of the foos, loop through them, and authorize each one individually. Is there an easier way to manage has_many authorization, preferably with the Pundit gem?</p>