Sha256: 0c29feb9f5681fe1645184c0192f961f6a4dd4f398269e31228d0db918605c31

Contents?: true

Size: 261 Bytes

Versions: 18

Compression:

Stored size: 261 Bytes

Contents

module Compony
  module ModelFields
    class Datetime < Base
      def value_for(data, controller: nil, format: nil, **_)
        return transform_and_join(data.send(@name), controller:) { |el| el.nil? ? nil : I18n.l(el, format:) }
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
compony-0.5.3 lib/compony/model_fields/datetime.rb
compony-0.5.2 lib/compony/model_fields/datetime.rb
compony-0.5.1 lib/compony/model_fields/datetime.rb
compony-0.5.0 lib/compony/model_fields/datetime.rb
compony-0.4.1 lib/compony/model_fields/datetime.rb
compony-0.4.0 lib/compony/model_fields/datetime.rb
compony-0.3.3 lib/compony/model_fields/datetime.rb
compony-0.3.2 lib/compony/model_fields/datetime.rb
compony-0.3.1 lib/compony/model_fields/datetime.rb
compony-0.3.0 lib/compony/model_fields/datetime.rb
compony-0.2.3 lib/compony/model_fields/datetime.rb
compony-0.2.2 lib/compony/model_fields/datetime.rb
compony-0.2.1 lib/compony/model_fields/datetime.rb
compony-0.2.0 lib/compony/model_fields/datetime.rb
compony-0.1.1 lib/compony/model_fields/datetime.rb
compony-0.1.0 lib/compony/model_fields/datetime.rb
compony-0.0.9 lib/compony/model_fields/datetime.rb
compony-0.0.8 lib/compony/model_fields/datetime.rb