<commit_before>class Public::TagsController < Public::BaseController

  def index
    add_breadcrumb 'Home', homepage_url
    add_breadcrumb 'Tags'
    find_options = {:limit => 100, :order => 'taggings_count DESC'}
    unless params[:term].blank?
      find_options[:conditions] = ['name like ?', "%#{params[:term]}%"]
    end
    @tags = Tag.with_type_scope('Page') { Tag.find(:all, find_options) }.sort_by(&:name)
    respond_to do |wants|
      wants.html {}
      wants.txt { render :text => @tags.map(&:name).join("\n") }
      wants.json { render :layout => false }
    end
  end
  
  def show
    @tag = Tag.find(params[:id])
    render_not_found and return unless @tag
    add_breadcrumb 'Home', homepage_url
    add_breadcrumb 'Tags', tags_path
    add_breadcrumb @tag.name
    @taggings = @tag.taggings.paginate(:all, :conditions => {:taggable_type => 'Page'}, :page => 1 )
    @taggables = @taggings.map(&:taggable)
  end

end<commit_msg>Updated the tags controller to support numbers<commit_after>class Public::TagsController < Public::BaseController

  def index
    add_breadcrumb 'Home', homepage_url
    add_breadcrumb 'Tags'
    find_options = {:limit => 100, :order => 'taggings_count DESC'}
    unless params[:term].blank?
      find_options[:conditions] = ['name like ?', "%#{params[:term]}%"]
    end
    @tags = Tag.with_type_scope('Page') { Tag.find(:all, find_options) }.sort_by(&:name)
    respond_to do |wants|
      wants.html {}
      wants.txt { render :text => @tags.map(&:name).join("\n") }
      wants.json { render :layout => false }
    end
  end
  
  def show
    @tag = Tag.find_by_permalink(params[:id])
    render_not_found and return unless @tag
    add_breadcrumb 'Home', homepage_url
    add_breadcrumb 'Tags', tags_path
    add_breadcrumb @tag.name
    @taggings = @tag.taggings.paginate(:all, :conditions => {:taggable_type => 'Page'}, :page => 1 )
    @taggables = @taggings.map(&:taggable)
  end

end
{'fraction_non_alphanumeric': 0.1500513874614594, 'fraction_numerical': 0.0041109969167523125, 'mean_word_length': 3.7142857142857144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6947752', 'n_tokens_mistral': 679, 'n_tokens_neox': 668, 'n_words': 145}