<commit_before>class PostsController < ApplicationController
  expose_decorated :post
  expose_decorated(:comments) {
    post.comments.includes(user: :profile).by_votes
  }
  expose(:comment) {
    body = session.to_hash.fetch("attempt_comment", {}).fetch(:body, nil)
    binding.pry
    Comment.new body: body
  }

  def index
    self.post = Post.landing
    render :show
  end

  def show
    redirect_to root_path if post.landing?
  end

  def like
    vote! 1
  end

  def dislike
    vote! -1
  end

  def random_comment
    self.comments = post.comments.random.decorate
  end

  private

  def vote!(value)
    post.add_or_update_evaluation(:votes, value, current_user)
  end
end
<commit_msg>damnit<commit_after>class PostsController < ApplicationController
  expose_decorated :post
  expose_decorated(:comments) {
    post.comments.includes(user: :profile).by_votes
  }
  expose(:comment) {
    body = session.to_hash.fetch("attempt_comment", {}).fetch(:body, nil)
    Comment.new body: body
  }

  def index
    self.post = Post.landing
    render :show
  end

  def show
    redirect_to root_path if post.landing?
  end

  def like
    vote! 1
  end

  def dislike
    vote! -1
  end

  def random_comment
    self.comments = post.comments.random.decorate
  end

  private

  def vote!(value)
    post.add_or_update_evaluation(:votes, value, current_user)
  end
end

{'fraction_non_alphanumeric': 0.09077705156136529, 'fraction_numerical': 0.002904865649963689, 'mean_word_length': 3.214067278287462, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4720611', 'n_tokens_mistral': 476, 'n_tokens_neox': 459, 'n_words': 107}