<commit_before>class HomeController < ApplicationController
  def index
    @stories = find_stories_for_user_and_tag_and_newest(@user, nil, false)

    @rss_link ||= "<link rel=\"alternate\" type=\"application/rss+xml\" " <<
      "title=\"RSS 2.0\" href=\"/rss\" />"

    respond_to do |format|
      format.html { render :action => "index" }
      format.rss { render :action => "rss", :layout => false }
    end
  end

  def newest
    @stories = find_stories_for_user_and_tag_and_newest(@user, nil, true)

    @page_title = "Newest Stories"

    @rss_link = "<link rel=\"alternate\" type=\"application/rss+xml\" " <<
      "title=\"RSS 2.0 - Newest Items\" href=\"/newest.rss\" />"

    @title = "Newest Stories"
    @title_url = "/newest"

    respond_to do |format|
      format.html { render :action => "index" }
      format.rss { render :action => "rss", :layout => false }
    end
  end

  def tagged
    @tag = Tag.find_by_tag!(params[:tag])
    @stories = find_stories_for_user_and_tag_and_newest(@user, @tag, false)

    @page_title = @tag.description

    @rss_link = "<link rel=\"alternate\" type=\"application/rss+xml\" " <<
      "title=\"RSS 2.0 - Tagged #{CGI.escape(@tag.tag)} " <<
      "(#{CGI.escape(@tag.description)})\" href=\"/t/" +
      "#{CGI.escape(@tag.tag)}.rss\" />"

    @title = @tag.description.blank?? @tag.tag : @tag.description
    @title_url = tag_url(@tag.tag)

    respond_to do |format|
      format.html { render :action => "index" }
      format.rss { render :action => "rss", :layout => false }
    end
  end
end
<commit_msg>show newest in rss url<commit_after>class HomeController < ApplicationController
  def index
    @stories = find_stories_for_user_and_tag_and_newest(@user, nil, false)

    @rss_link ||= "<link rel=\"alternate\" type=\"application/rss+xml\" " <<
      "title=\"RSS 2.0\" href=\"/rss\" />"

    respond_to do |format|
      format.html { render :action => "index" }
      format.rss { render :action => "rss", :layout => false }
    end
  end

  def newest
    @stories = find_stories_for_user_and_tag_and_newest(@user, nil, true)

    @page_title = "Newest Stories"

    @rss_link = "<link rel=\"alternate\" type=\"application/rss+xml\" " <<
      "title=\"RSS 2.0 - Newest Items\" href=\"/newest.rss\" />"

    @title = "Newest Stories"
    @title_url = "/newest"
    @newest = true

    respond_to do |format|
      format.html { render :action => "index" }
      format.rss { render :action => "rss", :layout => false }
    end
  end

  def tagged
    @tag = Tag.find_by_tag!(params[:tag])
    @stories = find_stories_for_user_and_tag_and_newest(@user, @tag, false)

    @page_title = @tag.description

    @rss_link = "<link rel=\"alternate\" type=\"application/rss+xml\" " <<
      "title=\"RSS 2.0 - Tagged #{CGI.escape(@tag.tag)} " <<
      "(#{CGI.escape(@tag.description)})\" href=\"/t/" +
      "#{CGI.escape(@tag.tag)}.rss\" />"

    @title = @tag.description.blank?? @tag.tag : @tag.description
    @title_url = tag_url(@tag.tag)

    respond_to do |format|
      format.html { render :action => "index" }
      format.rss { render :action => "rss", :layout => false }
    end
  end
end

{'fraction_non_alphanumeric': 0.17791798107255521, 'fraction_numerical': 0.0037854889589905363, 'mean_word_length': 3.0139240506329115, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '5196624', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1092, 'n_words': 230}