<commit_before># A status change needs to have at least one output and at most two
# The cases where there are 2 are as follows:
# 1. accepted taxon t1 (input) downgraded to synonym t1 (output1),
# with any associations transferred to accepted taxon t2 (output2)
# 2. accepted taxon t1 (input) downgraded to synonym t1 (output1), as part of
# status swap with synonym t2, with any associations transferred to accepted
# taxon t2 (output2)
# 3. synonym t1 upgraded to accepted taxon t1 (output1), as part of status swap
# with accepted taxon t2 (input), which becomes synonym t2 (output2), with
# any associations of t2 transferred to t1
# As a rule of thumb, if there are 2 outputs that means there are reassignments
# involved between the input and one of the outputs.
class NomenclatureChange::StatusChange < NomenclatureChange
  STEPS = [:primary_output, :relay_or_swap, :receive_or_swap, :notes, :summary]
  STATUSES = ['new', 'submitted'] + STEPS.map(&:to_s)
  build_basic_dictionary(*STATUSES)
  attr_accessible :primary_output_attributes, :secondary_output_attributes
  has_one :input, :inverse_of => :nomenclature_change,
    :class_name => NomenclatureChange::Input,
    :foreign_key => :nomenclature_change_id,
    :dependent => :destroy
  has_one :primary_output, :inverse_of => :nomenclature_change,
    :class_name => NomenclatureChange::Output,
    :foreign_key => :nomenclature_change_id,
    :conditions => {:is_primary_output => true},<commit_msg>Added necessary attr_accessible to status_change<commit_after># A status change needs to have at least one output and at most two
# The cases where there are 2 are as follows:
# 1. accepted taxon t1 (input) downgraded to synonym t1 (output1),
# with any associations transferred to accepted taxon t2 (output2)
# 2. accepted taxon t1 (input) downgraded to synonym t1 (output1), as part of
# status swap with synonym t2, with any associations transferred to accepted
# taxon t2 (output2)
# 3. synonym t1 upgraded to accepted taxon t1 (output1), as part of status swap
# with accepted taxon t2 (input), which becomes synonym t2 (output2), with
# any associations of t2 transferred to t1
# As a rule of thumb, if there are 2 outputs that means there are reassignments
# involved between the input and one of the outputs.
class NomenclatureChange::StatusChange < NomenclatureChange
  STEPS = [:primary_output, :relay_or_swap, :receive_or_swap, :notes, :summary]
  STATUSES = ['new', 'submitted'] + STEPS.map(&:to_s)
  build_basic_dictionary(*STATUSES)
  attr_accessible :primary_output_attributes, :secondary_output_attributes,
    :input_attributes
  has_one :input, :inverse_of => :nomenclature_change,
    :class_name => NomenclatureChange::Input,
    :foreign_key => :nomenclature_change_id,
    :dependent => :destroy
  has_one :primary_output, :inverse_of => :nomenclature_change,
    :class_name => NomenclatureChange::Output,
    :foreign_key => :nomenclature_change_id,
    :conditions => {:is_primary_output => true},
{'fraction_non_alphanumeric': 0.087073007367716, 'fraction_numerical': 0.016075016744809108, 'mean_word_length': 5.409871244635193, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '3009974', 'n_tokens_mistral': 937, 'n_tokens_neox': 871, 'n_words': 332}