Model Association (Rails 5 API)
You need to use ActiveModelSerializers (AMS) to serialize your json responses based upon the instances of your class.

class CampaignsController &lt; ApplicationController
  def index
    render json: { characters: campaign.characters }
  end

  def create
    @character = campaign.characters.new(character_params.merge(char_class_id: char_class.id))

    if @character.save!
        render json: @character, serializer: CharacterSerializer, status: 201 # This should automatically be formatted by AMS
    else
        not_found('Something went wrong: Check line 24 of the Character Controller')
    end
  end

  private

  def campaign
    @campaign ||= Campaign.find_by_id(params[:campaign_id])
  end

  def char_class
    @charClass ||= CharClass.find_by_id(params[:character_char_class_id])
  end
end


This is how you AMS class for Character class should look like

class CharacterSerializer &lt; ActiveModel::Serializer
  attributes :message, :character_name, :character_class, :character_level, :character_experience, :character_gold, :character_perks, :character_image

  def message
    'Successfull added this character to the campaign!'
  end

  def character_name
    return object.character_name + ' the ' + character_class # check the associations
  end

  def character_class
    object.charClass.class_name
  end

  def character_perks
    # Unsure what this get names methods does so im leaving it for you to refactor
    get_names(object.character_perks),
  end

end


Also add this to your ApplicationController

class ApplicationController &lt; ActionController::Base

  # Add this to your application controller

  def not_found(message = nil)
    render json: { message }, status: 404
  end

end


I'll update the refactored model class based upon your info soon. Hope this helps for now.