summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-06 20:52:04 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-06 20:52:04 +0100
commit464a2f4907bd27b62f7b5cc5d7537b90469b03bd (patch)
tree350c0fe981cfe1cf7d9b4de51ad73b7e3a26449b /app/controllers
parentc500e125c2ee5297b51e463f93940d450dab0813 (diff)
GsParameter can only be created or destroyed by migrations.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/gs_parameters_controller.rb18
1 files changed, 2 insertions, 16 deletions
diff --git a/app/controllers/gs_parameters_controller.rb b/app/controllers/gs_parameters_controller.rb
index be3378e..8f693aa 100644
--- a/app/controllers/gs_parameters_controller.rb
+++ b/app/controllers/gs_parameters_controller.rb
@@ -1,6 +1,7 @@
class GsParametersController < ApplicationController
def index
- @gs_parameters = GsParameter.all
+ @gs_parameters = GsParameter.order([:section, :name])
+ @sections = @gs_parameters.pluck(:section).uniq.sort
end
def show
@@ -11,15 +12,6 @@ class GsParametersController < ApplicationController
@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
@@ -32,10 +24,4 @@ class GsParametersController < ApplicationController
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