<commit_before>class RelationVisualizationsController < ApplicationController
  before_action :set_entity, only: [:show]

  def show
    authorize! :read, @entity
    if stale?(@entities, :public => current_user.nil?)
      @title = @entity.short_or_long_name
      @relations = (can? :manage, Entity) ? @entity.relations : @entity.relations.published
    end
    response.headers.except! 'X-Frame-Options'
  end

  private
  def set_entity
    @entity = Entity.all
      .includes(:related_posts, :related_photos, :mentions)
      .find_by_slug!(params[:id])
  end
end<commit_msg>Fix for embedded frame<commit_after>class RelationVisualizationsController < ApplicationController
  before_action :set_entity, only: [:show]

  def show
    authorize! :read, @entity
    response.headers.except! 'X-Frame-Options'
    if stale?(@entities, :public => current_user.nil?)
      @title = @entity.short_or_long_name
      @relations = (can? :manage, Entity) ? @entity.relations : @entity.relations.published
    end

  end

  private
  def set_entity
    @entity = Entity.all
      .includes(:related_posts, :related_photos, :mentions)
      .find_by_slug!(params[:id])
  end
end
{'fraction_non_alphanumeric': 0.11433447098976109, 'fraction_numerical': 0.0, 'mean_word_length': 3.991489361702128, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3829289', 'n_tokens_mistral': 377, 'n_tokens_neox': 363, 'n_words': 80}