Class: Alchemy::EssenceDate

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/alchemy/essence_date.rb

Instance Method Summary collapse

Instance Method Details

#preview_text(_maxlength = nil) ⇒ Object

Returns self.date for the Element#preview_text method.



18
19
20
21
# File 'app/models/alchemy/essence_date.rb', line 18

def preview_text(_maxlength = nil)
  return "" if date.blank?
  ::I18n.l(date, format: :date)
end