Commit f00b81ae39c9c9e9f13240446135f24486249aed

Authored by Rafael Manzo
1 parent 704662ba

Fix CompoundMetric creation form

After kalibro_client upgrade, scope now has the type nested as a key.
app/views/compound_metric_configurations/_metric_options.html.erb
... ... @@ -36,8 +36,10 @@
36 36  
37 37 <div class="form-row">
38 38 <div class="field-container">
39   - <%= f.label :scope, compound_metric_human_attribute_name('scope'), class: 'control-label' %>
40   - <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %>
  39 + <%= f.fields_for :scope do |scope_form| %>
  40 + <%= scope_form.label :type, compound_metric_human_attribute_name('scope'), class: 'control-label' %>
  41 + <%= scope_form.select( :type, scope_options, {class: 'form-control', selected: (metric.scope.type unless metric.nil?)} ) %>
  42 + <% end %>
41 43 </div>
42 44 <div class="help-container">
43 45 <p>
... ...