Sha256: 5ee718a06e59b8ebdd06e937fed81bab827696b0aa3096a3d3aac5da9115691b

Contents?: true

Size: 239 Bytes

Versions: 7

Compression:

Stored size: 239 Bytes

Contents

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
compony-0.0.7 lib/compony/model_fields/datetime.rb
compony-0.0.6 lib/compony/model_fields/datetime.rb
compony-0.0.5 lib/compony/model_fields/datetime.rb
compony-0.0.4 lib/compony/model_fields/datetime.rb
compony-0.0.3 lib/compony/model_fields/datetime.rb
compony-0.0.2 lib/compony/model_fields/datetime.rb
compony-0.0.1 lib/compony/model_fields/datetime.rb