diff --git a/app/controllers/chargeback_controller.rb b/app/controllers/chargeback_controller.rb index 6dcd9ec8344..1105ce52930 100644 --- a/app/controllers/chargeback_controller.rb +++ b/app/controllers/chargeback_controller.rb @@ -542,7 +542,7 @@ def cb_rate_set_form_vars @edit[:new][:details].push(temp) end - @edit[:new][:per_time_types] = ChargebackRateDetail::PER_TIME_TYPES + @edit[:new][:per_time_types] = ChargebackRateDetail::PER_TIME_TYPES.map { |x, y| [x, _(y)] }.to_h if params[:pressed] == 'chargeback_rates_copy' @rate.id = nil diff --git a/app/views/chargeback/_tier_first_row.haml b/app/views/chargeback/_tier_first_row.haml index ab977e5418f..b6783ffdfad 100644 --- a/app/views/chargeback/_tier_first_row.haml +++ b/app/views/chargeback/_tier_first_row.haml @@ -16,7 +16,7 @@ = r[:sub_metric_human] %td{:rowspan => n.to_s} = select_tag("per_time_#{i}", - options_for_select(ChargebackRateDetail::PER_TIME_TYPES.invert, @edit[:new][:details][i.to_i][:per_time]), + options_for_select(ChargebackRateDetail::PER_TIME_TYPES.map { |x, y| [x, _(y)] }.to_h.invert, @edit[:new][:details][i.to_i][:per_time]), "data-miq_observe" => {:url => url}.to_json) - measure = @edit[:new][:details][i.to_i][:detail_measure] - if measure.nil?