Class/Module Index [+]

Quicksearch

ModulgruppenController

Public Instance Methods

create() click to toggle source

POST /modulgruppen

# File app/controllers/modulgruppen_controller.rb, line 65
def create
  @modulgruppe = Modulgruppe.new(params[:modulgruppe])
  respond_to do |format|
    if @modulgruppe.save
      format.html { redirect_to @modulgruppe.studium, notice: 'Modulgruppe was successfully created.' }

    else
      format.html { render action: "new" }
      
    end
  end
end
destroy() click to toggle source

DELETE /modulgruppen/1

# File app/controllers/modulgruppen_controller.rb, line 94
def destroy
  @modulgruppe = Modulgruppe.find(params[:id])
  @modulgruppe.destroy

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

  end
end
edit() click to toggle source

GET /modulgruppen/1/edit

# File app/controllers/modulgruppen_controller.rb, line 50
def edit
  @studien = Studium.accessible_by(current_ability, :show)

  @modulgruppe = Modulgruppe.find(params[:id])
  if !params[:studium_id].nil?
    @studium=Studium.find(params[:studium_id])
  end
end
index() click to toggle source
# File app/controllers/modulgruppen_controller.rb, line 10
def index
  @studien = Studium.accessible_by(current_ability, :show)

  @modulgruppen = Modulgruppe.all
  if !params[:studium_id].nil?
    @studium=Studium.find(params[:studium_id])
  else
    @studium=Studium.first
  end
end
load_studien() click to toggle source
# File app/controllers/modulgruppen_controller.rb, line 7
def load_studien
      @studien = Studium.accessible_by(current_ability, :show)
end
new() click to toggle source

GET /modulgruppen/new

# File app/controllers/modulgruppen_controller.rb, line 34
def new
  @studien = Studium.accessible_by(current_ability, :show)

  @modulgruppe = Modulgruppe.new
  if !params[:studium_id].nil?
    @modulgruppe.studium_id=(params[:studium_id])
  else
    @modulgruppe.studium_id=studium_id=Studium.first.id
  end
  respond_to do |format|
    format.html # new.html.erb
  end

end
show() click to toggle source

GET /modulgruppen/1

# File app/controllers/modulgruppen_controller.rb, line 22
def show
  @modulgruppe = Modulgruppe.find(params[:id])
  @studien = Studium.accessible_by(current_ability, :show)

  @studium = Studium.find(@modulgruppe.studium_id)
  if !params[:studium_id].nil?
    @studium=Studium.find(params[:studium_id])
  end
end
update() click to toggle source
# File app/controllers/modulgruppen_controller.rb, line 79
def update
  @modulgruppe = Modulgruppe.find(params[:id])
  respond_to do |format|
    if @modulgruppe.update_attributes(params[:modulgruppe])
      format.html { redirect_to @modulgruppe, notice: 'Modulgruppe was successfully updated.' }
      
    else
      format.html { render action: "edit" }
      
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.