Sha256: 3edeb8515035a3441af9562e85b1850e3ed44fc52db64245b54af4494b10b14d

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module Wallaby
  module Resources
    module Index
      # Html cell
      class DatetimeHtml < Cell
        # @return [String]
        def render
          if value.nil?
            null
          else
            self.value = Time.zone.parse value if value.is_a? String
            concat content_tag(:span, I18n.l(value, format: :short))
            itooltip I18n.l(value), 'time'
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wallaby-6.0.2 app/views/wallaby/resources/index/datetime_html.rb
wallaby-6.0.1 app/views/wallaby/resources/index/datetime_html.rb