Skip to content

Commit

Permalink
Merge pull request ManageIQ#6288 from mzazrivec/apply_gettext_to_mode…
Browse files Browse the repository at this point in the history
…l_constants_2

ChargebackRateDetail: Apply gettext to model constants
  • Loading branch information
himdel authored Oct 22, 2019
2 parents 612cb45 + b55994f commit b360191
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/chargeback_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/views/chargeback/_tier_first_row.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit b360191

Please sign in to comment.