<commit_before>class EntriesController < ApplicationController

  def index
    @entries = Entry.all.order(published: :desc).page(params[:page]).per(10)
      HTML_Truncator.self_closing_tags.delete "img"
      HTML_TRUNCATOR.truncate(entry.content , 140)
    

    if blog_id = params[:blog_id]
      @entries = @entries.where(blog_id: blog_id)
    end

    respond_to do |format|
       format.json { render json: @entries, status: 200 }
       format.xml { render json: @entries, status: 200 }
       format.html { render :index }
    end
    
    
  end

  def show
    @entry = Entry.find(params[:id])
    respond_to do |format|
       format.json { render json: @entry, status: 200 }
       format.xml { render json: @entry, status: 200 }
       format.html { render :index }
    end
  end

  def destroy
    @entry = Entry.find(params[:id])
    @entry.destroy<commit_msg>fixed truncator<commit_after>class EntriesController < ApplicationController

  def index
    @entries = Entry.all.order(published: :desc).page(params[:page]).per(10)
   
    

    if blog_id = params[:blog_id]
      @entries = @entries.where(blog_id: blog_id)
    end

    respond_to do |format|
       format.json { render json: @entries, status: 200 }
       format.xml { render json: @entries, status: 200 }
       format.html { render :index }
    end
    
     @entry = Entry.find(params[:id])
      HTML_Truncator.self_closing_tags.delete "img"
      HTML_TRUNCATOR.truncate(@entry.content , 140)
    
    
  end

  def show
    @entry = Entry.find(params[:id])
    respond_to do |format|
       format.json { render json: @entry, status: 200 }
       format.xml { render json: @entry, status: 200 }
       format.html { render :index }
    end
  end

  def destroy
    @entry = Entry.find(params[:id])
    @entry.destroy
{'fraction_non_alphanumeric': 0.11461794019933555, 'fraction_numerical': 0.018826135105204873, 'mean_word_length': 2.7028688524590163, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6067547', 'n_tokens_mistral': 616, 'n_tokens_neox': 569, 'n_words': 138}