Sha256: 56d3f0ee24b91b6d08b82ae1f77e2439ae3ec4e7f215165e3d249bd96aa58112

Contents?: true

Size: 257 Bytes

Versions: 18

Compression:

Stored size: 257 Bytes

Contents

module Compony
  module ModelFields
    class Date < 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/date.rb
compony-0.5.2 lib/compony/model_fields/date.rb
compony-0.5.1 lib/compony/model_fields/date.rb
compony-0.5.0 lib/compony/model_fields/date.rb
compony-0.4.1 lib/compony/model_fields/date.rb
compony-0.4.0 lib/compony/model_fields/date.rb
compony-0.3.3 lib/compony/model_fields/date.rb
compony-0.3.2 lib/compony/model_fields/date.rb
compony-0.3.1 lib/compony/model_fields/date.rb
compony-0.3.0 lib/compony/model_fields/date.rb
compony-0.2.3 lib/compony/model_fields/date.rb
compony-0.2.2 lib/compony/model_fields/date.rb
compony-0.2.1 lib/compony/model_fields/date.rb
compony-0.2.0 lib/compony/model_fields/date.rb
compony-0.1.1 lib/compony/model_fields/date.rb
compony-0.1.0 lib/compony/model_fields/date.rb
compony-0.0.9 lib/compony/model_fields/date.rb
compony-0.0.8 lib/compony/model_fields/date.rb