module ContentViewHelper
  def full_title_for(content)
    "#{t(content_type_number(content), number: content.number)}: #{content.name}"
  end

  def short_title_for(content)
    content.name
  end

  private

  def content_type_number(content)
    "#{content_type(content)}_number"
  end

  def content_type(content)
    content.is_a?(Exercise) ? "exercise" : content.class.name.downcase
  end
end

module ContentViewHelper
  def full_title_for(content)
    "#{t(content_type_number(content), number: content.number)}: #{content.name}"
  end

  def short_title_for(content)
    content.name
  end

  private

  def content_type_number(content)
    "#{content_type(content)}_number"
  end

  def content_type(content)
    content.model_name.element
  end
end

Use model_name to get class name instead of type testing
Use model_name to get class name instead of type testing
