<commit_before>class Task < Conversation

  has_many :events, foreign_key: 'conversation_id'
  has_and_belongs_to_many :doers, class_name: 'User', join_table: 'task_doers'

  has_many :conversation_groups, dependent: :destroy, foreign_key: 'conversation_id'
  has_many :groups, through: :conversation_groups do
    def active
      where(conversation_groups: {active: true})
    end
  end

  validates_presence_of :position

  default_scopes.clear
  default_scope { unscoped.order('conversations.position ASC') }

  acts_as_list :scope => :organization
<commit_msg>made tasks and conversations indicate their active status in the same way<commit_after>class Task < Conversation

  has_many :events, foreign_key: 'conversation_id'
  has_and_belongs_to_many :doers, class_name: 'User', join_table: 'task_doers'

  has_many :conversation_groups, dependent: :destroy, foreign_key: 'conversation_id'

  validates_presence_of :position

  default_scopes.clear
  default_scope { unscoped.order('conversations.position ASC') }

  acts_as_list :scope => :organization

{'fraction_non_alphanumeric': 0.08498583569405099, 'fraction_numerical': 0.0, 'mean_word_length': 6.066666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6914900', 'n_tokens_mistral': 350, 'n_tokens_neox': 335, 'n_words': 79}