class ZvukoveSuboriesController < ApplicationController
  # GET /zvukove_subories
  # GET /zvukove_subories.json
  def index
    @zvukove_subories = ZvukoveSubory.all

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

  # GET /zvukove_subories/1
  # GET /zvukove_subories/1.json
  def show
    @zvukove_subory = ZvukoveSubory.find(params[:id])

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

  # GET /zvukove_subories/new
  # GET /zvukove_subories/new.json
  def new
    @zvukove_subory = ZvukoveSubory.new

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

  # GET /zvukove_subories/1/edit
  def edit
    @zvukove_subory = ZvukoveSubory.find(params[:id])
  end

  # POST /zvukove_subories
  # POST /zvukove_subories.json
  def create
    @zvukove_subory = ZvukoveSubory.new(params[:zvukove_subory])

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

  # PUT /zvukove_subories/1
  # PUT /zvukove_subories/1.json
  def update
    @zvukove_subory = ZvukoveSubory.find(params[:id])

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

  # DELETE /zvukove_subories/1
  # DELETE /zvukove_subories/1.json
  def destroy
    @zvukove_subory = ZvukoveSubory.find(params[:id])
    @zvukove_subory.destroy

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