class CStavSponzorDarsController < ApplicationController
  # GET /c_stav_sponzor_dars
  # GET /c_stav_sponzor_dars.json
  def index
    @c_stav_sponzor_dars = CStavSponzorDar.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @c_stav_sponzor_dars }
    end
  end

  # GET /c_stav_sponzor_dars/1
  # GET /c_stav_sponzor_dars/1.json
  def show
    @c_stav_sponzor_dar = CStavSponzorDar.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @c_stav_sponzor_dar }
    end
  end

  # GET /c_stav_sponzor_dars/new
  # GET /c_stav_sponzor_dars/new.json
  def new
    @c_stav_sponzor_dar = CStavSponzorDar.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @c_stav_sponzor_dar }
    end
  end

  # GET /c_stav_sponzor_dars/1/edit
  def edit
    @c_stav_sponzor_dar = CStavSponzorDar.find(params[:id])
  end

  # POST /c_stav_sponzor_dars
  # POST /c_stav_sponzor_dars.json
  def create
    @c_stav_sponzor_dar = CStavSponzorDar.new(params[:c_stav_sponzor_dar])

    respond_to do |format|
      if @c_stav_sponzor_dar.save
        format.html { redirect_to @c_stav_sponzor_dar, notice: 'C stav sponzor dar was successfully created.' }
        format.json { render json: @c_stav_sponzor_dar, status: :created, location: @c_stav_sponzor_dar }
      else
        format.html { render action: "new" }
        format.json { render json: @c_stav_sponzor_dar.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /c_stav_sponzor_dars/1
  # PUT /c_stav_sponzor_dars/1.json
  def update
    @c_stav_sponzor_dar = CStavSponzorDar.find(params[:id])

    respond_to do |format|
      if @c_stav_sponzor_dar.update_attributes(params[:c_stav_sponzor_dar])
        format.html { redirect_to @c_stav_sponzor_dar, notice: 'C stav sponzor dar was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @c_stav_sponzor_dar.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /c_stav_sponzor_dars/1
  # DELETE /c_stav_sponzor_dars/1.json
  def destroy
    @c_stav_sponzor_dar = CStavSponzorDar.find(params[:id])
    @c_stav_sponzor_dar.destroy

    respond_to do |format|
      format.html { redirect_to c_stav_sponzor_dars_url }
      format.json { head :no_content }
    end
  end
end
