Sha256: d3a96b8771824b5fc5143da63315b923467abc486ae5c27c6aa85a92a5f23d8a

Contents?: true

Size: 356 Bytes

Versions: 4

Compression:

Stored size: 356 Bytes

Contents

module Para
  module AttributeField
    class DatetimeField < AttributeField::Base
      register :datetime, :date, self

      field_option :wrapper, :wrapper_name

      def value_for(instance)
        (value = instance.send(name)) && ::I18n.l(value, format: :admin)
      end

      def wrapper_name
        :horizontal_form
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
para-0.7.0 lib/para/attribute_field/datetime.rb
para-0.6.9 lib/para/attribute_field/datetime.rb
para-0.6.8 lib/para/attribute_field/datetime.rb
para-0.6.7 lib/para/attribute_field/datetime.rb