POST /gremien POST /gremien.json
# File app/controllers/gremien_controller.rb, line 67 def create @gremium = Gremium.new(params[:gremium]) respond_to do |format| if @gremium.save format.html { redirect_to @gremium, notice: 'Gremium was successfully created.' } format.json { render json: @gremium, status: :created, location: @gremium } else format.html { render action: "new" } format.json { render json: @gremium.errors, status: :unprocessable_entity } end end end
DELETE /gremien/1
# File app/controllers/gremien_controller.rb, line 110 def destroy @gremium = Gremium.find(params[:id]) @gremium.destroy respond_to do |format| format.html { redirect_to gremien_url } format.json { head :no_content } end end
GET /gremien/1/edit
# File app/controllers/gremien_controller.rb, line 57 def edit @gremium = Gremium.find(params[:id]) @memberships=@gremium.memberships.order(:fetprofile_id).active @memberships<< Membership.new end
# File app/controllers/gremien_controller.rb, line 18 def index if params[:filter].nil? @gremien = Gremium.where("CAST(typ AS INT) < 10").order(:typ).order(:name) else @gremien = Gremium.order(:typ).order(:name).where("CAST(typ AS INT) = ?",params[:filter].to_i) end @gremientabs=Gremium.tabs end
GET /gremien/new GET /gremien/new.json
# File app/controllers/gremien_controller.rb, line 46 def new @gremium = Gremium.new @memberships=[Membership.new] respond_to do |format| format.html # new.html.erb format.json { render json: @gremium } end end
GET /gremien/1 GET /gremien/1.json
# File app/controllers/gremien_controller.rb, line 33 def show @gremium = Gremium.find(params[:id]) @gremientabs=Gremium.tabs @memberships=@gremium.memberships.visible_in_gremium @nlinks = @gremium.nlinks.page(params[:page]).per(5) respond_to do |format| format.html # show.html.erb format.json { render json: @gremium } end end
PUT /gremien/1 PUT /gremien/1.json
# File app/controllers/gremien_controller.rb, line 83 def update @gremium = Gremium.find(params[:id]) respond_to do |format| if @gremium.update_attributes(params[:gremium]) format.html { unless params[:button]=="continue" || params[:commit]=="continue" redirect_to @gremium, notice: 'Gremium was successfully updated.' else @memberships=@gremium.memberships.order(:typ) @memberships<< Membership.new @memberships<< Membership.new @memberships<< Membership.new render action: "edit", notice: 'gremium was successfully updated.' end } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @gremium.errors, status: :unprocessable_entity } end end end
# File app/controllers/gremien_controller.rb, line 6 def verwalten @gremien = Gremium.all @gremientabs=Gremium.tabs @toolbar_elements << {:text=>I18n.t('gremium.new'),:path=>new_gremium_path() ,:icon=>:plus} if can? :new, Gremium @toolbar_elements << {:text=>I18n.t('profile.new'),:path=>new_fetprofile_path() ,:icon=>:plus} if can? :new, Fetprofile respond_to do |format| format.html # index.html.erb format.json { render json: @gremien } end end
Generated with the Darkfish Rdoc Generator 2.