Sha256: 632e593d22dcbb298d6cf1e1f5e8023695e90f7b49a432330754a88990e9ef73

Contents?: true

Size: 348 Bytes

Versions: 30

Compression:

Stored size: 348 Bytes

Contents

# frozen_string_literal: true

module Koi
  module SummaryList
    class DateComponent < Base
      def initialize(model, attribute, format: :admin, **)
        super(model, attribute, **)

        @format = format
      end

      def attribute_value
        l(raw_value.to_date, format: @format) if raw_value.present?
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
katalyst-koi-4.10.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.10.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.9.5 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.9.4 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.9.3 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.9.2 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.9.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.9.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.8.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.8.0 app/components/koi/summary_list/date_component.rb