class ProductSerializer < ActiveModel::Serializer
  attributes :id, :name, :description, :price, :product_category

  def product_category
    object.product_category.name
  end

end

class ProductSerializer < ActiveModel::Serializer
  attributes :id, :name, :description, :price, :category

  def category
    object.product_category.name
  end

end

Rename product_category to category in product serializer
Rename product_category to category in product serializer
