Sha256: 0d48c9ed3cf53f9890876ff0fca1709ce4b56b3e569be937b5ca89cac8bfdbe6

Contents?: true

Size: 557 Bytes

Versions: 71

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: alchemy_essence_dates
#
#  id         :integer          not null, primary key
#  date       :datetime
#  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

71 entries across 71 versions & 1 rubygems

Version Path
alchemy_cms-5.3.8 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.9 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.7 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.8 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.6 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.7 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.6 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.5 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.4 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.3 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.2 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.1 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.5 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.0 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.4 app/models/alchemy/essence_date.rb
alchemy_cms-6.0.0.pre.rc7 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.3 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.2 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.1 app/models/alchemy/essence_date.rb
alchemy_cms-5.3.0 app/models/alchemy/essence_date.rb