<commit_before>class PagesController < ApplicationController
  before_action :set_page, only: [:edit, :update]
  
  def index
    @pages = Page.all
    authorize @pages
  end

  def edit
    authorize @page
  end

  def update
    authorize @page
    @page.update( page_params )
    redirect_to edit_page_path @page
  end

  def new<commit_msg>Update Page controller with update notice.<commit_after>class PagesController < ApplicationController
  before_action :set_page, only: [:edit, :update]
  
  def index
    @pages = Page.all
    authorize @pages
  end

  def edit
    authorize @page
  end

  def update
    authorize @page
    if @page.update( page_params )
      redirect_to edit_page_path( @page ), notice: "Page updated successfully."
    else
      redirect_to edit_page_path @page
    end
  end

  def new
{'fraction_non_alphanumeric': 0.06715506715506715, 'fraction_numerical': 0.0, 'mean_word_length': 3.120603015075377, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6521410', 'n_tokens_mistral': 260, 'n_tokens_neox': 251, 'n_words': 78}