<commit_before>class PostsController < FilterController
  # GET /posts
  # GET /posts.json
  def index
    redirect_to "/"
  end

  # GET /posts/1
  # GET /posts/1.json
  def show
    @post = Post.find(params[:id])
    @title = @post.title
    @parent_comments = @post.comments
		@comment = Comment.new

    respond_to do |format|
      format.html
      format.json { render :json => @post }
    end
  end

  # GET /posts/new
  # GET /posts/new.json
  def new
    @post = Post.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render :json => @post }
    end
  end
<commit_msg>Added issue request #30 from hackful issues 'share url support'<commit_after>class PostsController < FilterController
  # GET /posts
  # GET /posts.json
  def index
    redirect_to "/"
  end

  # GET /posts/1
  # GET /posts/1.json
  def show
    @post = Post.find(params[:id])
    @title = @post.title
    @parent_comments = @post.comments
		@comment = Comment.new

    respond_to do |format|
      format.html
      format.json { render :json => @post }
    end
  end

  # GET /posts/new
  # GET /posts/new.json
  def new
    @post = Post.new(:link => params[:link], :title => params[:title])

    respond_to do |format|
      format.html # new.html.erb
      format.json { render :json => @post }
    end
  end

{'fraction_non_alphanumeric': 0.12066365007541478, 'fraction_numerical': 0.004524886877828055, 'mean_word_length': 2.376590330788804, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5812758', 'n_tokens_mistral': 459, 'n_tokens_neox': 445, 'n_words': 120}