def apply_slug_limit(candidate, uuid)
      return candidate unless candidate && friendly_id_config.slug_limit

      candidate[0...candidate_limit(uuid)]
    end
def apply_slug_limit(candidate, uuid)
      return candidate unless candidate && friendly_id_config.slug_limit

      candidate[0...candidate_limit(uuid)]
    end
Private: Apply slug limit to candidate.

 candidate - the String with candidate.
 uuid      - the String with UUID.

 Return the String with truncated candidate.