Module: TranslationsHelper

Defined in:
app/helpers/translations_helper.rb

Instance Method Summary collapse

Instance Method Details

#ldate(dt) ⇒ Object

Just return an empty string if the given date is null



3
4
5
# File 'app/helpers/translations_helper.rb', line 3

def ldate(dt)
  dt ? dt.strftime('%d-%m-%Y') : ''
end

#mdate(dt) ⇒ Object



6
7
8
# File 'app/helpers/translations_helper.rb', line 6

def mdate(dt)
  dt ? l(dt.to_date) : ''
end