class ContentsController < ApplicationController
  # GET /contents
  # GET /contents.json
  def index
    @contents = Content.all

    render json: @contents
  end
end

class ContentsController < ApplicationController
  # GET /contents
  # GET /contents.json
  def index
    @contents = Content.all

    render body: @contents.first.json, content_type: 'application/json'
  end
end

Adjust index action to return json directly from db
Adjust index action to return json directly from db
