ADD: Informationsseite:

Models für Themengruppen/Themen/FAQs/Attachments
Views für Themengruppen/Themen
This commit is contained in:
HausdorffHimself
2013-08-13 18:31:22 +02:00
parent a2b35d3d60
commit e055b60a53
16 changed files with 101 additions and 62 deletions

View File

@@ -13,42 +13,42 @@ class ThemengruppenController < ApplicationController
# GET /themengruppen/1
# GET /themengruppen/1.json
def show
@themagruppen = Themengruppe.find(params[:id])
@themengruppe = Themengruppe.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @themagruppen }
format.json { render json: @themengruppe }
end
end
# GET /themengruppen/new
# GET /themengruppen/new.json
def new
@themagruppen = Themengruppe.new
@themengruppe = Themengruppe.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @themagruppen }
format.json { render json: @themengruppe }
end
end
# GET /themengruppen/1/edit
def edit
@themagruppen = Themengruppe.find(params[:id])
@themengruppe = Themengruppe.find(params[:id])
end
# POST /themengruppen
# POST /themengruppen.json
def create
@themagruppen = Themengruppe.new(params[:themagruppen])
@themengruppe = Themengruppe.new(params[:themengruppe])
respond_to do |format|
if @themagruppen.save
format.html { redirect_to @themagruppen, notice: 'Themengruppe was successfully created.' }
format.json { render json: @themagruppen, status: :created, location: @themagruppen }
if @themengruppe.save
format.html { redirect_to @themengruppe, notice: 'Themengruppe was successfully created.' }
format.json { render json: @themengruppe, status: :created, location: @themengruppe }
else
format.html { render action: "new" }
format.json { render json: @themagruppen.errors, status: :unprocessable_entity }
format.json { render json: @themengruppe.errors, status: :unprocessable_entity }
end
end
end
@@ -56,15 +56,15 @@ class ThemengruppenController < ApplicationController
# PUT /themengruppen/1
# PUT /themengruppen/1.json
def update
@themagruppen = Themengruppe.find(params[:id])
@themengruppe = Themengruppe.find(params[:id])
respond_to do |format|
if @themagruppen.update_attributes(params[:themagruppen])
format.html { redirect_to @themagruppen, notice: 'Themengruppe was successfully updated.' }
if @themengruppe.update_attributes(params[:themengruppe])
format.html { redirect_to @themengruppe, notice: 'Themengruppe was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @themagruppen.errors, status: :unprocessable_entity }
format.json { render json: @themengruppe.errors, status: :unprocessable_entity }
end
end
end
@@ -72,8 +72,8 @@ class ThemengruppenController < ApplicationController
# DELETE /themengruppen/1
# DELETE /themengruppen/1.json
def destroy
@themagruppen = Themengruppe.find(params[:id])
@themagruppen.destroy
@themengruppe = Themengruppe.find(params[:id])
@themengruppe.destroy
respond_to do |format|
format.html { redirect_to themengruppen_url }