class TesteLabel2sController < ApplicationController
  before_action :set_teste_label2, only: [:show, :edit, :update, :destroy]

  # GET /teste_label2s
  # GET /teste_label2s.json
  def index
    @teste_label2s = TesteLabel2.all
  end

  # GET /teste_label2s/1
  # GET /teste_label2s/1.json
  def show
  end

  # GET /teste_label2s/new
  def new
    @teste_label2 = TesteLabel2.new
  end

  # GET /teste_label2s/1/edit
  def edit
  end

  # POST /teste_label2s
  # POST /teste_label2s.json
  def create
    @teste_label2 = TesteLabel2.new(teste_label2_params)

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

  # PATCH/PUT /teste_label2s/1
  # PATCH/PUT /teste_label2s/1.json
  def update
    respond_to do |format|
      if @teste_label2.update(teste_label2_params)
        format.html { redirect_to @teste_label2, notice: 'Teste label2 was successfully updated.' }
        format.json { render :show, status: :ok, location: @teste_label2 }
      else
        format.html { render :edit }
        format.json { render json: @teste_label2.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /teste_label2s/1
  # DELETE /teste_label2s/1.json
  def destroy
    @teste_label2.destroy
    respond_to do |format|
      format.html { redirect_to teste_label2s_url, notice: 'Teste label2 was successfully destroyed.' }
      format.json { head :no_content }
    end
  end

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

    # Never trust parameters from the scary internet, only allow the white list through.
    def teste_label2_params
      params.require(:teste_label2).permit(:name)
    end
end
