Sha256: 6dcd7a0f0308141b7feec6d9be5bba18455442472f00ceeaeb2ca1c9d189beab

Contents?: true

Size: 354 Bytes

Versions: 48

Compression:

Stored size: 354 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
        :vertical_form
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
para-0.12.4 lib/para/attribute_field/datetime.rb
para-0.12.3 lib/para/attribute_field/datetime.rb
para-0.12.2 lib/para/attribute_field/datetime.rb
para-0.12.1 lib/para/attribute_field/datetime.rb
para-0.12.0 lib/para/attribute_field/datetime.rb
para-0.11.4 lib/para/attribute_field/datetime.rb
para-0.11.3 lib/para/attribute_field/datetime.rb
para-0.11.2 lib/para/attribute_field/datetime.rb
para-0.11.1 lib/para/attribute_field/datetime.rb
para-0.11.0 lib/para/attribute_field/datetime.rb
para-0.10.0 lib/para/attribute_field/datetime.rb
para-0.9.4 lib/para/attribute_field/datetime.rb
para-0.9.3.3 lib/para/attribute_field/datetime.rb
para-0.9.3.2 lib/para/attribute_field/datetime.rb
para-0.9.3.1 lib/para/attribute_field/datetime.rb
para-0.9.2 lib/para/attribute_field/datetime.rb
para-0.9.0 lib/para/attribute_field/datetime.rb
para-0.8.15 lib/para/attribute_field/datetime.rb
para-0.8.14 lib/para/attribute_field/datetime.rb
para-0.8.13 lib/para/attribute_field/datetime.rb