class CStavCinnostisController < ApplicationController
  # GET /c_stav_cinnostis
  # GET /c_stav_cinnostis.json
  def index
    @c_stav_cinnostis = CStavCinnosti.all

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

  # GET /c_stav_cinnostis/1
  # GET /c_stav_cinnostis/1.json
  def show
    @c_stav_cinnosti = CStavCinnosti.find(params[:id])

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

  # GET /c_stav_cinnostis/new
  # GET /c_stav_cinnostis/new.json
  def new
    @c_stav_cinnosti = CStavCinnosti.new

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

  # GET /c_stav_cinnostis/1/edit
  def edit
    @c_stav_cinnosti = CStavCinnosti.find(params[:id])
  end

  # POST /c_stav_cinnostis
  # POST /c_stav_cinnostis.json
  def create
    @c_stav_cinnosti = CStavCinnosti.new(params[:c_stav_cinnosti])

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

  # PUT /c_stav_cinnostis/1
  # PUT /c_stav_cinnostis/1.json
  def update
    @c_stav_cinnosti = CStavCinnosti.find(params[:id])

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

  # DELETE /c_stav_cinnostis/1
  # DELETE /c_stav_cinnostis/1.json
  def destroy
    @c_stav_cinnosti = CStavCinnosti.find(params[:id])
    @c_stav_cinnosti.destroy

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