<commit_before>module Bookshelf
  class Project < ActiveRecord::Base
    has_many :project_contents, :dependent => :destroy

    def contents
      project_contents
    end
  end
end<commit_msg>moved save project contents functionality to its own module; updated controller to serve project_contents.body for xml requests<commit_after>module Bookshelf
  class Project < ActiveRecord::Base
    has_many :project_contents, :dependent => :destroy

    def as_json
      (super :except => :mod_date).tap do |answer|
        answer[:mod_date] = mod_date.to_i
      end
    end

    def contents
      project_contents
    end
  end
end
{'fraction_non_alphanumeric': 0.06349206349206349, 'fraction_numerical': 0.0, 'mean_word_length': 3.507142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '6791372', 'n_tokens_mistral': 178, 'n_tokens_neox': 171, 'n_words': 56}