title: How to implement multiple different serializers for same model using ActiveModel::Serializers?
body: <p>Let's say you're implementing a REST API in Rails.  When serving a collection, you might want to only include a few attributes:</p>
  
  <pre><code>/people
  </code></pre>
  
  <p>But when serving a single resource, you want to include all the attributes:</p>
  
  <pre><code>/people/1
  </code></pre>
  
  <p>I don't see how to do that using ActiveModel::Serializers, since the examples all use the pattern of defining one serializer per model (with a standard naming convention) and having AMS automatically use the right one in the controller when you do:</p>
  
  <pre><code>render json: @people
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>render json: @person
  </code></pre>