title: Rails 5 does not render JSON for create
body: <p>I have an API-only Rails 5 app.</p>
  
  <p>My customers_controller_test fails with </p>
  
  <pre><code>ActionView::MissingTemplate: Missing template api/v1/customers/show, application/show with {:locale=&gt;[:en], :formats=&gt;[:html], :variants=&gt;[], :handlers=&gt;[:raw, :erb, :html, :builder, :ruby, :jbuilder]
  </code></pre>
  
  <p>I can't understand why.</p>
  
  <p>The controller looks like this (Scaffold)</p>
  
  <pre><code>  # POST /customers
    # POST /customers.json
    def create
      @customer = Customer.new(customer_params)
  
      if @customer.save
        render :show, status: :created, location: api_v1_customer_url(@customer)
      else
        render json: @customer.errors, status: :unprocessable_entity
      end
    end
  
    # PATCH/PUT /customers/1
    # PATCH/PUT /customers/1.json
    def update
      if @customer.update(customer_params)
        render :show, status: :ok, location: api_v1_customer_url(@customer)
      else
        render json: @customer.errors, status: :unprocessable_entity
      end
    end
  </code></pre>
  
  <p>So why does POST return HTML when PUT correctly returns JSON?</p>
  
  <p>The test passes fine with this change:</p>
  
  <pre><code>  # POST /customers
    # POST /customers.json
    def create
      @customer = Customer.new(customer_params)
  
      if @customer.save
        render json: 'show', status: :created, location: api_v1_customer_url(@customer)
      else
        render json: @customer.errors, status: :unprocessable_entity
      end
    end
  </code></pre>
  
  <p>Is anyone able to explain that?</p>