summaryrefslogtreecommitdiff
path: root/app/controllers/acd_callers_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/controllers/acd_callers_controller.rb
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'app/controllers/acd_callers_controller.rb')
-rw-r--r--app/controllers/acd_callers_controller.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/controllers/acd_callers_controller.rb b/app/controllers/acd_callers_controller.rb
new file mode 100644
index 0000000..ab58064
--- /dev/null
+++ b/app/controllers/acd_callers_controller.rb
@@ -0,0 +1,41 @@
+class AcdCallersController < ApplicationController
+ def index
+ @acd_callers = AcdCaller.all
+ end
+
+ def show
+ @acd_caller = AcdCaller.find(params[:id])
+ end
+
+ def new
+ @acd_caller = AcdCaller.new
+ end
+
+ def create
+ @acd_caller = AcdCaller.new(params[:acd_caller])
+ if @acd_caller.save
+ redirect_to @acd_caller, :notice => t('acd_callers.controller.successfuly_created')
+ else
+ render :new
+ end
+ end
+
+ def edit
+ @acd_caller = AcdCaller.find(params[:id])
+ end
+
+ def update
+ @acd_caller = AcdCaller.find(params[:id])
+ if @acd_caller.update_attributes(params[:acd_caller])
+ redirect_to @acd_caller, :notice => t('acd_callers.controller.successfuly_updated')
+ else
+ render :edit
+ end
+ end
+
+ def destroy
+ @acd_caller = AcdCaller.find(params[:id])
+ @acd_caller.destroy
+ redirect_to acd_callers_url, :notice => t('acd_callers.controller.successfuly_destroyed')
+ end
+end