Module: Gera::CurrencyRateHelper

Defined in:
app/helpers/gera/currency_rate_helper.rb

Instance Method Summary collapse

Instance Method Details

#currency_rate_class(cer) ⇒ Object



16
17
18
# File 'app/helpers/gera/currency_rate_helper.rb', line 16

def currency_rate_class(cer)
  "cer-mode-#{cer.mode}"
end

#currency_rate_columns(cer) ⇒ Object



8
9
10
11
12
13
14
# File 'app/helpers/gera/currency_rate_helper.rb', line 8

def currency_rate_columns(cer)
  if cer.external_rate_id.present?
    %i[id created_at rate_value mode external_rate tooltip metadata]
  else
    %i[id created_at rate_value mode tooltip metadata]
  end
end

#currency_rate_mode_autoshow_style(crm) ⇒ Object



4
5
6
# File 'app/helpers/gera/currency_rate_helper.rb', line 4

def currency_rate_mode_autoshow_style(crm)
  'display: none' unless crm.mode_cross?
end