<commit_before>class User
  include Mongoid::Document
  include GDS::SSO::User

  cache

  field  :uid, :type => String
  field  :email, :type => String
  field  :version, :type => Integer
  field  :name, :type => String

  scope :alphabetized, order_by(name: :asc)

  def self.find_by_uid(uid)
    first(conditions: {uid: uid})
  end

  def record_action(edition, type, options={})
    action = edition.new_action(self, type, options)
    messenger_topic = action.to_s.downcase
    Messenger.instance.send messenger_topic,edition.container
    NoisyWorkflow.make_noise(edition.container,action).deliver
  end
  
  def record_note(edition, comment)
    edition.new_action(self, 'note', comment: comment)
  end

  PUBLICATION_CLASSES = {
    :place             => Place,
    :local_transaction => LocalTransaction,<commit_msg>removing marples message on create action (duplicate of active record action)<commit_after>class User
  include Mongoid::Document
  include GDS::SSO::User

  cache

  field  :uid, :type => String
  field  :email, :type => String
  field  :version, :type => Integer
  field  :name, :type => String

  scope :alphabetized, order_by(name: :asc)

  def self.find_by_uid(uid)
    first(conditions: {uid: uid})
  end

  def record_action(edition, type, options={})
    action = edition.new_action(self, type, options)
    messenger_topic = action.to_s.downcase
    Messenger.instance.send messenger_topic,edition.container unless messenger_topic == "created"
    NoisyWorkflow.make_noise(edition.container,action).deliver
  end
  
  def record_note(edition, comment)
    edition.new_action(self, 'note', comment: comment)
  end

  PUBLICATION_CLASSES = {
    :place             => Place,
    :local_transaction => LocalTransaction,
{'fraction_non_alphanumeric': 0.10742857142857143, 'fraction_numerical': 0.0, 'mean_word_length': 4.017191977077364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1023466', 'n_tokens_mistral': 577, 'n_tokens_neox': 552, 'n_words': 132}