<commit_before>class InstructionsController < ApplicationController
  
  def index
    @instructions = Instruction.order('created_at desc')
  end
  
  def show
    @instruction = Instruction.find(params[:id])
  end

  def new
    @instruction = Instruction.new
  end
  
  def create
    @instruction = Instruction.new(params[:instruction])
    if @instruction.save
      redirect_to instructions_path, :notice => "Successfully created instruction."
    else
      render :action => 'new'
    end
  end
end<commit_msg>make instructions fresh when lastest updated<commit_after>class InstructionsController < ApplicationController
  
  def index
    @instructions = Instruction.order('created_at desc')
    fresh_when last_modified: @instructions.maximum(:created_at)
  end
  
  def show
    @instruction = Instruction.find(params[:id])
  end

  def new
    @instruction = Instruction.new
  end
  
  def create
    @instruction = Instruction.new(params[:instruction])
    if @instruction.save
      redirect_to instructions_path, :notice => "Successfully created instruction."
    else
      render :action => 'new'
    end
  end
end
{'fraction_non_alphanumeric': 0.0831858407079646, 'fraction_numerical': 0.0, 'mean_word_length': 3.597560975609756, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '240403', 'n_tokens_mistral': 327, 'n_tokens_neox': 305, 'n_words': 83}