<commit_before>class NewsController < ApplicationController
  before_filter :set_breadcrumb ,:except => [:index]
  def index
    add_breadcrumb "News", "news"
    set_page_title("News")

    @news = News.where(:is_archive => false, :is_active => true).page(params[:page])
  end

  def show
    @news = News.by_slug(params[:id])
    add_breadcrumb @news.news_title, @news.slug

    if @news.nil? || !@news.is_active
      flash[:error] = "News not found"
      redirect_to news_index_path
    else
      set_page_title(@news.news_title)
    end
  end

  def rating
    @news = News.find(params[:id])
    @news.rate params[:score] ,current_user
    @news.save
    render :nothing => true
  end
  def set_breadcrumb
    add_breadcrumb "Announcements", :announcements_path
  end
end<commit_msg>rectify breadcrumb for news<commit_after>class NewsController < ApplicationController
  before_filter :set_breadcrumb ,:except => [:index]
  def index
    add_breadcrumb "News", "news"
    set_page_title("News")

    @news = News.where(:is_archive => false, :is_active => true).page(params[:page])
  end

  def show
    @news = News.by_slug(params[:id])
    add_breadcrumb @news.news_title, @news.slug

    if @news.nil? || !@news.is_active
      flash[:error] = "News not found"
      redirect_to news_index_path
    else
      set_page_title(@news.news_title)
    end
  end

  def rating
    @news = News.find(params[:id])
    @news.rate params[:score] ,current_user
    @news.save
    render :nothing => true
  end
  def set_breadcrumb
    add_breadcrumb "News", news_index_path
  end
end
{'fraction_non_alphanumeric': 0.11701454775458571, 'fraction_numerical': 0.0, 'mean_word_length': 3.5988372093023258, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '227555', 'n_tokens_mistral': 548, 'n_tokens_neox': 541, 'n_words': 118}