class CinnostisController < ApplicationController
  # GET /cinnostis
  # GET /cinnostis.json
  def index
    @cinnostis = Cinnosti.all

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

  # GET /cinnostis/1
  # GET /cinnostis/1.json
  def show
    @cinnosti = Cinnosti.find(params[:id])

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

  # GET /cinnostis/new
  # GET /cinnostis/new.json
  def new
    @cinnosti = Cinnosti.new

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

  # GET /cinnostis/1/edit
  def edit
    @cinnosti = Cinnosti.find(params[:id])
  end

  # POST /cinnostis
  # POST /cinnostis.json
  def create
    @cinnosti = Cinnosti.new(params[:cinnosti])

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

  # PUT /cinnostis/1
  # PUT /cinnostis/1.json
  def update
    @cinnosti = Cinnosti.find(params[:id])

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

  # DELETE /cinnostis/1
  # DELETE /cinnostis/1.json
  def destroy
    @cinnosti = Cinnosti.find(params[:id])
    @cinnosti.destroy

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