diff options
Diffstat (limited to 'app/controllers/gs_parameters_controller.rb')
-rw-r--r-- | app/controllers/gs_parameters_controller.rb | 18 |
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 |