<commit_before>class Asunto < ActiveRecord::Base

  LEGACY_CONSTRAINTS = [:numero, :letra, :pasada, :tipo, :asuntoentr]

  # @return [Expediente]
  belongs_to :expediente

  # @return [Array<Comision>] Comisiones asignadas en el orden correcto.
  def comisiones
    comisiones_ids = [comision6, comision5, comision4, comision3, comision2,
      comision1].delete_if { |i| i == 0 }
    # I make use of an on memory array to avoid multiple queries.
    comisiones_array = Comision.where(:id => comisiones_ids).all
    comisiones_ids.map do |i|
      comisiones_array.detect { |c| c.id == i }
    end
  end

end
<commit_msg>Fix comisions order.<commit_after>class Asunto < ActiveRecord::Base

  LEGACY_CONSTRAINTS = [:numero, :letra, :pasada, :tipo, :asuntoentr]

  # @return [Expediente]
  belongs_to :expediente

  # @return [Array<Comision>] Comisiones asignadas en el orden correcto.
  def comisiones
    comisiones_ids = [comision1, comision2, comision3, comision4, comision5,
      comision6].delete_if { |i| i == 0 }
    # I make use of an on memory array to avoid multiple queries.
    comisiones_array = Comision.where(:id => comisiones_ids).all
    comisiones_ids.map do |i|
      comisiones_array.detect { |c| c.id == i }
    end
  end

end

{'fraction_non_alphanumeric': 0.10648518815052041, 'fraction_numerical': 0.01120896717373899, 'mean_word_length': 3.8076923076923075, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1161085', 'n_tokens_mistral': 464, 'n_tokens_neox': 455, 'n_words': 118}