diff options
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 |