# class LvasController

### Public Instance Methods

create() click to toggle source

POST /lvas POST /lvas.json

    # File controllers/lvas_controller.rb, line 32
    def create
      @lva = Lva.new(params[:lva])

      respond_to do |format|
        if @lva.save
          format.html { redirect_to @lva, notice: 'Lva was successfully created.' }

        else
          format.html { render action: "new" }

        end
      end
    end

destroy() click to toggle source

DELETE /lvas/1 DELETE /lvas/1.json

    # File controllers/lvas_controller.rb, line 64
    def destroy
      @lva = Lva.find(params[:id])
      @lva.destroy

      respond_to do |format|
        format.html { redirect_to lvas_url }

      end
    end

edit() click to toggle source

GET /lvas/1/edit

    # File controllers/lvas_controller.rb, line 26
    def edit
      @lva = Lva.find(params[:id])
    end

index() click to toggle source

    # File controllers/lvas_controller.rb, line 4
    def index
      @lvas = Lva.all

    end

new() click to toggle source

GET /lvas/new GET /lvas/new.json

    # File controllers/lvas_controller.rb, line 18
    def new
      @lva = Lva.new
      modul=Modul.find(params[:modul_id])
      @lva.modul<<modul

    end

show() click to toggle source

GET /lvas/1

    # File controllers/lvas_controller.rb, line 11
    def show
      @lva = Lva.find(params[:id])
      @toolbar_elements<<{:icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)}
    end

update() click to toggle source

PUT /lvas/1 PUT /lvas/1.json

    # File controllers/lvas_controller.rb, line 48
    def update
      @lva = Lva.find(params[:id])

      respond_to do |format|
        if @lva.update_attributes(params[:lva])
          format.html { redirect_to @lva, notice: 'Lva was successfully updated.' }

        else
          format.html { render action: "edit" }

        end
      end
    end