<commit_before>class DescriptionsController < ApplicationController
  def show
    @description = Description.find(params[:id]) rescue nil
    if @description.nil? || @description.title.blank?
      render :text => 'Description is not yet available.'
    end
  end

  ##
  # This is used in the '?'- button for output elements. It gets the description using the outputelement id
  def charts
    @description = Description.where(:describable_id => params[:id], :describable_type => 'OutputElement').first
    render :show, :layout => false
  end
end<commit_msg>charts: fix fancybox on costs chart popups<commit_after>class DescriptionsController < ApplicationController
  def show
    @description = Description.find(params[:id]) rescue nil
    if @description.nil? || @description.title.blank?
      render :text => 'Description is not yet available.'
    end
    render :layout => false if request.xhr?
  end

  ##
  # This is used in the '?'- button for output elements. It gets the description using the outputelement id
  def charts
    @description = Description.where(:describable_id => params[:id], :describable_type => 'OutputElement').first
    render :show, :layout => false
  end
end
{'fraction_non_alphanumeric': 0.10209205020920502, 'fraction_numerical': 0.0, 'mean_word_length': 4.067796610169491, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '812348', 'n_tokens_mistral': 320, 'n_tokens_neox': 316, 'n_words': 112}