class AlumnusController < ApplicationController
  # GET /alumnus
  # GET /alumnus.xml
  def index
    @alumnus = Alumnu.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @alumnus }
    end
  end

  # GET /alumnus/1
  # GET /alumnus/1.xml
  def show
    @alumnu = Alumnu.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @alumnu }
    end
  end

  # GET /alumnus/new
  # GET /alumnus/new.xml
  def new
    @alumnu = Alumnu.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @alumnu }
    end
  end

  # GET /alumnus/1/edit
  def edit
    @alumnu = Alumnu.find(params[:id])
  end

  # POST /alumnus
  # POST /alumnus.xml
  def create
    @alumnu = Alumnu.new(params[:alumnu])

    respond_to do |format|
      if @alumnu.save
        flash[:notice] = 'Alumnu was successfully created.'
        format.html { redirect_to(@alumnu) }
        format.xml  { render :xml => @alumnu, :status => :created, :location => @alumnu }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @alumnu.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /alumnus/1
  # PUT /alumnus/1.xml
  def update
    @alumnu = Alumnu.find(params[:id])

    respond_to do |format|
      if @alumnu.update_attributes(params[:alumnu])
        flash[:notice] = 'Alumnu was successfully updated.'
        format.html { redirect_to(@alumnu) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @alumnu.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /alumnus/1
  # DELETE /alumnus/1.xml
  def destroy
    @alumnu = Alumnu.find(params[:id])
    @alumnu.destroy

    respond_to do |format|
      format.html { redirect_to(alumnus_url) }
      format.xml  { head :ok }
    end
  end
end
