<commit_before>class Admin::VenuesController < ApplicationController
  before_action :set_admin_venue, only: [:show, :edit, :update, :destroy]

  # GET /admin/venues
  # GET /admin/venues.json
  def index
    @admin_venues = Admin::Venue.all
  end

  # GET /admin/venues/1
  # GET /admin/venues/1.json
  def show
  end

  # GET /admin/venues/new
  def new
    @admin_venue = Admin::Venue.new
  end

  # GET /admin/venues/1/edit
  def edit
  end

  # POST /admin/venues
  # POST /admin/venues.json
  def create
    @admin_venue = Admin::Venue.new(admin_venue_params)

    respond_to do |format|
      if @admin_venue.save
        format.html { redirect_to @admin_venue, notice: 'Venue was successfully created.' }
        format.json { render :show, status: :created, location: @admin_venue }
      else
        format.html { render :new }
        format.json { render json: @admin_venue.errors, status: :unprocessable_entity }
      end
    end
  end

  # PATCH/PUT /admin/venues/1
  # PATCH/PUT /admin/venues/1.json
  def update
    respond_to do |format|
      if @admin_venue.update(admin_venue_params)
        format.html { redirect_to @admin_venue, notice: 'Venue was successfully updated.' }
        format.json { render :show, status: :ok, location: @admin_venue }
      else
        format.html { render :edit }
        format.json { render json: @admin_venue.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /admin/venues/1
  # DELETE /admin/venues/1.json
  def destroy
    @admin_venue.destroy
    respond_to do |format|
      format.html { redirect_to admin_venues_url, notice: 'Venue was successfully destroyed.' }
      format.json { head :no_content }
    end
  end

  private
    # Use callbacks to share common setup or constraints between actions.
    def set_admin_venue
      @admin_venue = Admin::Venue.find(params[:id])
    end

    # Never trust parameters from the scary internet, only allow the white list through.
    def admin_venue_params
      params[:admin_venue]
    end
end<commit_msg>Replaces generated controller code<commit_after>class Admin::VenuesController < Admin::AdminAreaController
  before_action :set_admin_venue, only: [:show, :edit, :update, :destroy]

  # GET /admin/venues
  # GET /admin/venues.json
  def index
    @admin_venues = Venue.all
  end

  # GET /admin/venues/1
  # GET /admin/venues/1.json
  def show
  end

  # GET /admin/venues/new
  def new
    @admin_venue = Venue.new
  end

  # GET /admin/venues/1/edit
  def edit
  end

  # POST /admin/venues
  # POST /admin/venues.json
  def create
    @admin_venue = Venue.new(admin_venue_params)

    respond_to do |format|
      if @admin_venue.save
        format.html { redirect_to @admin_venue, notice: 'Venue was successfully created.' }
        format.json { render :show, status: :created, location: @admin_venue }
      else
        format.html { render :new }
        format.json { render json: @admin_venue.errors, status: :unprocessable_entity }
      end
    end
  end

  # PATCH/PUT /admin/venues/1
  # PATCH/PUT /admin/venues/1.json
  def update
    respond_to do |format|
      if @admin_venue.update(admin_venue_params)
        format.html { redirect_to @admin_venue, notice: 'Venue was successfully updated.' }
        format.json { render :show, status: :ok, location: @admin_venue }
      else
        format.html { render :edit }
        format.json { render json: @admin_venue.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /admin/venues/1
  # DELETE /admin/venues/1.json
  def destroy
    @admin_venue.destroy
    respond_to do |format|
      format.html { redirect_to admin_venues_url, notice: 'Venue was successfully destroyed.' }
      format.json { head :no_content }
    end
  end

  private
    # Use callbacks to share common setup or constraints between actions.
    def set_admin_venue
      @admin_venue = Venue.find(params[:id])
    end

    # Never trust parameters from the scary internet, only allow the white list through.
    def admin_venue_params
      params.require(:admin_venue).permit(:name, :phone, :email, :url, :address, :postcode, :image, :image_alt, :content)
    end
end
{'fraction_non_alphanumeric': 0.09691313711414214, 'fraction_numerical': 0.0033500837520938024, 'mean_word_length': 2.8847583643122676, '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': '1678421', 'n_tokens_mistral': 1363, 'n_tokens_neox': 1335, 'n_words': 360}