Sha256: 722f3a450215a6284d157863009f31e0c722e2058cd2de8d0bfddbafc8067d43

Contents?: true

Size: 602 Bytes

Versions: 30

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_dates
#
#  id         :integer          not null, primary key
#  date       :datetime
#  creator_id :integer
#  updater_id :integer
#  created_at :datetime         not null
#  updated_at :datetime         not null
#

module Alchemy
  class EssenceDate < BaseRecord
    acts_as_essence ingredient_column: 'date'

    # Returns self.date for the Element#preview_text method.
    def preview_text(_maxlength = nil)
      return "" if date.blank?
      ::I18n.l(date, format: :'alchemy.essence_date')
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
alchemy_cms-4.6.7 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.6 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.5 app/models/alchemy/essence_date.rb
alchemy_cms-4.5.1 app/models/alchemy/essence_date.rb
alchemy_cms-4.4.5 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.4 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.3 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.2 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.1 app/models/alchemy/essence_date.rb
alchemy_cms-4.6.0 app/models/alchemy/essence_date.rb
alchemy_cms-4.5.0 app/models/alchemy/essence_date.rb
alchemy_cms-4.4.4 app/models/alchemy/essence_date.rb
alchemy_cms-4.4.3 app/models/alchemy/essence_date.rb
alchemy_cms-4.4.2 app/models/alchemy/essence_date.rb
alchemy_cms-4.4.1 app/models/alchemy/essence_date.rb
alchemy_cms-4.4.0 app/models/alchemy/essence_date.rb
alchemy_cms-4.3.2 app/models/alchemy/essence_date.rb
alchemy_cms-4.2.4 app/models/alchemy/essence_date.rb
alchemy_cms-4.3.1 app/models/alchemy/essence_date.rb
alchemy_cms-4.2.3 app/models/alchemy/essence_date.rb