<commit_before>module IndexPager
  
  def index
    controller = self.controller_name.downcase    
    model_name=controller.classify
    model_class=eval(model_name)
    objects = eval("@"+controller)
    objects.size
    @hidden=0
    params[:page] ||= "latest"
    
    if (model_class.respond_to?("policy")) 
      authorized=Authorization.authorize_collection("show",objects,current_user)
      @hidden=objects.size - authorized.size
      objects=authorized
    end
    objects=model_class.paginate_after_fetch(objects, :page=>params[:page]) unless objects.respond_to?("page_totals")
    eval("@"+controller+"= objects")
    
    respond_to do |format|
      format.html
      format.xml
    end
    
  end
  
end<commit_msg>Fixed issue with index_pager showing hidden things<commit_after>module IndexPager
  
  def index
    controller = self.controller_name.downcase    
    model_name=controller.classify
    model_class=eval(model_name)
    objects = eval("@"+controller)
    objects.size
    @hidden=0
    params[:page] ||= "latest"
    
    if Authorization::ASSET_TYPES.include?(model_class.name) 
      authorized=Authorization.authorize_collection("show",objects,current_user)
      @hidden=objects.size - authorized.size
      objects=authorized
    end
    objects=model_class.paginate_after_fetch(objects, :page=>params[:page]) unless objects.respond_to?("page_totals")
    eval("@"+controller+"= objects")
    
    respond_to do |format|
      format.html
      format.xml
    end
    
  end
  
end
{'fraction_non_alphanumeric': 0.1074489123269611, 'fraction_numerical': 0.0013183915622940012, 'mean_word_length': 3.5449101796407185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '872812', 'n_tokens_mistral': 461, 'n_tokens_neox': 462, 'n_words': 75}