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

    render json: @contents
  end
end
```

Adjust index action to return json directly from db
user
```ruby
class ContentsController < ApplicationController
  # GET /contents
  # GET /contents.json
  def index
    @contents = Content.all

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