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.15.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.15.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.14.3 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.14.2 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.14.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.14.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.13.2 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.13.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.6 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.5 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.4 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.3 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.2 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.12.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.11.2 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.11.1 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.11.0 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.10.3 app/components/koi/summary_list/date_component.rb
katalyst-koi-4.10.2 app/components/koi/summary_list/date_component.rb