<commit_before>class Post < ActiveRecord::Base
  has_many :comments, :order => "created_at ASC"
  has_and_belongs_to_many :tags
  
  named_scope :archive, :group => "month(created_at)"

  validates_presence_of :text, :title
  
  def date
    created_at.to_date.to_s(:long_ordinal)
  end
  
  def to_s
    title
  end
  
  def to_param
    if title.blank?
      id
    else
      "#{id}-#{title.parameterize}"
    end<commit_msg>Fixed typo in post.rb model and delegate a few date/time methods to the created_at date<commit_after>class Post < ActiveRecord::Base
  has_many :comments, :order => "created_at ASC"
  has_and_belongs_to_many :tags
  
  named_scope :archive, :group => "month(created_at)"

  validates_presence_of :body, :title
  
  delegate :day, :month, :year, :to => :created_at
  
  def date
    created_at.to_date.to_s(:long_ordinal)
  end
  
  def to_s
    title
  end
  
  def to_param
    if title.blank?
      id
    else
      "#{id}-#{title.parameterize}"
    end
{'fraction_non_alphanumeric': 0.09959349593495935, 'fraction_numerical': 0.0, 'mean_word_length': 3.1914893617021276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '65957', 'n_tokens_mistral': 363, 'n_tokens_neox': 362, 'n_words': 85}