summaryrefslogtreecommitdiff
path: root/app/controllers/gs_parameters_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:10:07 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-05 23:10:07 +0100
commit3862734b5e0833ed108300102c68159e40ffd93a (patch)
tree4491044dbf48aea515303382e7664cf9be2cb182 /app/controllers/gs_parameters_controller.rb
parent380a4cdfe5cfa573fb916ca7c2145a6062ef8198 (diff)
parent57196d838691aeba38ad7e088e83c0881a213861 (diff)
Merge branch 'replace_constants' into develop
Diffstat (limited to 'app/controllers/gs_parameters_controller.rb')
-rw-r--r--app/controllers/gs_parameters_controller.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/controllers/gs_parameters_controller.rb b/app/controllers/gs_parameters_controller.rb
new file mode 100644
index 0000000..be3378e
--- /dev/null
+++ b/app/controllers/gs_parameters_controller.rb
@@ -0,0 +1,41 @@
+class GsParametersController < ApplicationController
+ def index
+ @gs_parameters = GsParameter.all
+ end
+
+ def show
+ @gs_parameter = GsParameter.find(params[:id])
+ end
+
+ def new
+ @gs_parameter = GsParameter.new
+ end
+
+ def create
+ @gs_parameter = GsParameter.new(params[:gs_parameter])
+ if @gs_parameter.save
+ redirect_to @gs_parameter, :notice => t('gs_parameters.controller.successfuly_created')
+ else
+ render :new
+ end
+ end
+
+ def edit
+ @gs_parameter = GsParameter.find(params[:id])
+ end
+
+ def update
+ @gs_parameter = GsParameter.find(params[:id])
+ if @gs_parameter.update_attributes(params[:gs_parameter])
+ redirect_to @gs_parameter, :notice => t('gs_parameters.controller.successfuly_updated')
+ else
+ render :edit
+ end
+ end
+
+ def destroy
+ @gs_parameter = GsParameter.find(params[:id])
+ @gs_parameter.destroy
+ redirect_to gs_parameters_url, :notice => t('gs_parameters.controller.successfuly_destroyed')
+ end
+end