class GaleriaFotkiesController < ApplicationController
  # GET /galeria_fotkies
  # GET /galeria_fotkies.json
  def index
    @galeria_fotkies = GaleriaFotky.all

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

  # GET /galeria_fotkies/1
  # GET /galeria_fotkies/1.json
  def show
    @galeria_fotky = GaleriaFotky.find(params[:id])

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

  # GET /galeria_fotkies/new
  # GET /galeria_fotkies/new.json
  def new
    @galeria_fotky = GaleriaFotky.new

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

  # GET /galeria_fotkies/1/edit
  def edit
    @galeria_fotky = GaleriaFotky.find(params[:id])
  end

  # POST /galeria_fotkies
  # POST /galeria_fotkies.json
  def create
    @galeria_fotky = GaleriaFotky.new(params[:galeria_fotky])

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

  # PUT /galeria_fotkies/1
  # PUT /galeria_fotkies/1.json
  def update
    @galeria_fotky = GaleriaFotky.find(params[:id])

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

  # DELETE /galeria_fotkies/1
  # DELETE /galeria_fotkies/1.json
  def destroy
    @galeria_fotky = GaleriaFotky.find(params[:id])
    @galeria_fotky.destroy

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