From 22c690749e154a5426c4f190fbbc08a5dee2eeee Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 25 Jul 2026 17:29:35 +0200 Subject: Retire the unroutable occurrences scaffolding --- app/controllers/occurrences_controller.rb | 97 ------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 app/controllers/occurrences_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/occurrences_controller.rb b/app/controllers/occurrences_controller.rb deleted file mode 100644 index 2e3c2ec1..00000000 --- a/app/controllers/occurrences_controller.rb +++ /dev/null @@ -1,97 +0,0 @@ -class OccurrencesController < ApplicationController - - # Private - - before_action :login_required - - # GET /occurrences - # GET /occurrences.xml - def index - @occurrences = Occurrence.all - - respond_to do |format| - format.html # index.html.erb - format.xml { render :xml => @occurrences } - end - end - - # GET /occurrences/1 - # GET /occurrences/1.xml - def show - @occurrence = Occurrence.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.xml { render :xml => @occurrence } - end - end - - # GET /occurrences/new - # GET /occurrences/new.xml - def new - @occurrence = Occurrence.new - - respond_to do |format| - format.html # new.html.erb - format.xml { render :xml => @occurrence } - end - end - - # GET /occurrences/1/edit - def edit - @occurrence = Occurrence.find(params[:id]) - end - - # POST /occurrences - # POST /occurrences.xml - def create - @occurrence = Occurrence.new(occurrence_params) - - respond_to do |format| - if @occurrence.save - flash[:notice] = t("flash.occurrences.created") - format.html { redirect_to(@occurrence) } - format.xml { render :xml => @occurrence, :status => :created, :location => @occurrence } - else - format.html { render :action => "new" } - format.xml { render :xml => @occurrence.errors, :status => :unprocessable_entity } - end - end - end - - # PUT /occurrences/1 - # PUT /occurrences/1.xml - def update - @occurrence = Occurrence.find(params[:id]) - - respond_to do |format| - if @occurrence.update(occurrence_params) - flash[:notice] = t("flash.occurrences.updated") - format.html { redirect_to(@occurrence) } - format.xml { head :ok } - else - format.html { render :action => "edit" } - format.xml { render :xml => @occurrence.errors, :status => :unprocessable_entity } - end - end - end - - # DELETE /occurrences/1 - # DELETE /occurrences/1.xml - def destroy - @occurrence = Occurrence.find(params[:id]) - @occurrence.destroy - - respond_to do |format| - format.html { redirect_to(occurrences_url) } - format.xml { head :ok } - end - end - - private - - def occurrence_params - params.require(:occurrence).permit(:start_time, :end_time, :node_id, :event_id) - end - -end -- cgit v1.3