diff options
| author | cedricnjanga | 2018-05-16 23:40:23 -0700 | 
|---|---|---|
| committer | Johan Van Ryseghem | 2018-05-31 14:10:09 +0200 | 
| commit | ab00694f49336a326d934ff0bd85b76e2e0a6c23 (patch) | |
| tree | ef6e2e264f909d49c0ea991b21c45ac1307dfef5 /app/controllers/compliance_controls_controller.rb | |
| parent | cc4f4a0abff3eeef4af6091180777bf3a0de6746 (diff) | |
| download | chouette-core-ab00694f49336a326d934ff0bd85b76e2e0a6c23.tar.bz2 | |
Refs #7057 Display ComplianceControl object type to CCSet#select_type & CCSet#show views
Diffstat (limited to 'app/controllers/compliance_controls_controller.rb')
| -rw-r--r-- | app/controllers/compliance_controls_controller.rb | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/app/controllers/compliance_controls_controller.rb b/app/controllers/compliance_controls_controller.rb index 7df922d01..a20602c63 100644 --- a/app/controllers/compliance_controls_controller.rb +++ b/app/controllers/compliance_controls_controller.rb @@ -5,7 +5,11 @@ class ComplianceControlsController < ChouetteController    actions :all, :except => [:index]    def select_type -    @sti_subclasses = ComplianceControl.subclasses.sort_by {|compliance_control| compliance_control.default_code} +    @sti_subclasses = Hash.new  +     +    ComplianceControl.subclass_patterns.each do |key, value| +      @sti_subclasses[key] = ComplianceControl.subclasses.select {|klass| klass.object_type == value} +    end    end    def show | 
