diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-07 11:37:03 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-07 11:37:03 +0100 |
commit | 11f186a118285fbc87a536af26730780a9ad01f5 (patch) | |
tree | fe6363b036f60f238916d070b3d0cb0625dd53c8 /app/controllers/gs_parameters_controller.rb | |
parent | 2b94b16ee1201d15b3b9d66e142df311141a47db (diff) | |
parent | 3e19646f46c772e10ed3d7a45e8c974ab23f625b (diff) |
Merge branch 'develop'5.1.1
Diffstat (limited to 'app/controllers/gs_parameters_controller.rb')
-rw-r--r-- | app/controllers/gs_parameters_controller.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/gs_parameters_controller.rb b/app/controllers/gs_parameters_controller.rb index bd8b44b..106ce76 100644 --- a/app/controllers/gs_parameters_controller.rb +++ b/app/controllers/gs_parameters_controller.rb @@ -4,9 +4,15 @@ class GsParametersController < ApplicationController before_filter :spread_breadcrumbs def index - @gs_parameters_unordered = GsParameter.scoped - @gs_parameters = GsParameter.order([:section, :name]) - @sections = @gs_parameters.pluck(:section).uniq.sort + @gs_parameters = GsParameter.order([:entity, :section, :name]) + + @entities = Hash.new() + @gs_parameters.each do |parameter| + if !@entities[parameter.entity] + @entities[parameter.entity] = Hash.new() + end + @entities[parameter.entity][parameter.section] = true + end end def show |