From f00b81ae39c9c9e9f13240446135f24486249aed Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Wed, 17 Feb 2016 15:39:53 -0200 Subject: [PATCH] Fix CompoundMetric creation form --- app/views/compound_metric_configurations/_metric_options.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/compound_metric_configurations/_metric_options.html.erb b/app/views/compound_metric_configurations/_metric_options.html.erb index 21b2910..fbc5666 100644 --- a/app/views/compound_metric_configurations/_metric_options.html.erb +++ b/app/views/compound_metric_configurations/_metric_options.html.erb @@ -36,8 +36,10 @@
- <%= f.label :scope, compound_metric_human_attribute_name('scope'), class: 'control-label' %> - <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %> + <%= f.fields_for :scope do |scope_form| %> + <%= scope_form.label :type, compound_metric_human_attribute_name('scope'), class: 'control-label' %> + <%= scope_form.select( :type, scope_options, {class: 'form-control', selected: (metric.scope.type unless metric.nil?)} ) %> + <% end %>

-- libgit2 0.21.2