diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-10 10:34:57 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-10 10:34:57 +0100 |
commit | 70c436c52c76cf866b03fcab6bc43437c9490cd1 (patch) | |
tree | cf7dc1f98464d3893718be1900dd6a98437c41a5 /app/controllers/gs_parameters_controller.rb | |
parent | b1fad77507c71402d25f085c048848462c2d52f1 (diff) |
GsParameter :entity, :section and :name can't be changed in the GUI any more.
Diffstat (limited to 'app/controllers/gs_parameters_controller.rb')
-rw-r--r-- | app/controllers/gs_parameters_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/gs_parameters_controller.rb b/app/controllers/gs_parameters_controller.rb index 8f693aa..a35e373 100644 --- a/app/controllers/gs_parameters_controller.rb +++ b/app/controllers/gs_parameters_controller.rb @@ -18,10 +18,15 @@ class GsParametersController < ApplicationController def update @gs_parameter = GsParameter.find(params[:id]) - if @gs_parameter.update_attributes(params[:gs_parameter]) + if @gs_parameter.update_attributes(gs_parameter_params) redirect_to @gs_parameter, :notice => t('gs_parameters.controller.successfuly_updated') else render :edit end end + + private + def gs_parameter_params + params.require(:gs_parameter).permit(:value, :class_type, :description) + end end |