<commit_before>module Context
class PagesController < Context::ApplicationController
  before_filter :find_page_by_path

  # Renders the page content in the relevant layout.
  # Can be overloaded by the outside application to use a custom show layout.
  def show
    respond_to do |format|
      if Context::Configuration.page_show_template_path then
        format.html { render :file => Context::Configuration.page_show_template_path, :layout => @page.layout }
      else
        format.html { render :text => @page.to_html, :layout => @page.layout }
      end
      # TODO: Provide to_xml, to_json, etc.
    end
  end

private
  def find_page_by_path
    @page=context_page
    if @page.nil? then
      raise ActionController::UnknownAction
      return false
    else
      return true
    end
  end

end
end<commit_msg>No need to return true from a before filter, page will be returned at this point which is fine<commit_after>module Context
class PagesController < Context::ApplicationController
  before_filter :find_page_by_path

  # Renders the page content in the relevant layout.
  # Can be overloaded by the outside application to use a custom show layout.
  def show
    respond_to do |format|
      if Context::Configuration.page_show_template_path then
        format.html { render :file => Context::Configuration.page_show_template_path, :layout => @page.layout }
      else
        format.html { render :text => @page.to_html, :layout => @page.layout }
      end
      # TODO: Provide to_xml, to_json, etc.
    end
  end

private
  def find_page_by_path
    @page=context_page
    if @page.nil? then
      raise ActionController::UnknownAction
      return false
    end
  end

end
end
{'fraction_non_alphanumeric': 0.06756756756756757, 'fraction_numerical': 0.0, 'mean_word_length': 3.278894472361809, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5515517', 'n_tokens_mistral': 487, 'n_tokens_neox': 482, 'n_words': 164}