<commit_before>module ModelVersion

  def self.index_number(versioned_model)
    if versioned_model && last_version = versioned_model.versions.last
      last_version.index + 1
    else
      1
    end
  end
end<commit_msg>correct live / reified version numbers<commit_after>module ModelVersion

  def self.index_number(versioned_model)
    return unless versioned_model
    if versioned_model.live?
      versioned_model.versions.last.index + 1
    elsif versioned_model.respond_to?(:version)
      versioned_model.version.index
    else
      1
    end
  end
end
{'fraction_non_alphanumeric': 0.05851063829787234, 'fraction_numerical': 0.0070921985815602835, 'mean_word_length': 3.4488188976377954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '73234', 'n_tokens_mistral': 176, 'n_tokens_neox': 171, 'n_words': 37}