lib/formulario/fields/field.rb in formulario-0.1.3 vs lib/formulario/fields/field.rb in formulario-0.1.4

- old
+ new

@@ -27,15 +27,15 @@ build(raw_value) end end def self.type_for(field_type) - type_for = TYPES.fetch(field_type) { field_type } - if type_for < ::Formulario::Form - FormField[type_for] + type = TYPES.fetch(field_type) { field_type } + if type < ::Formulario::Form + FormField[type] else - type_for + type end end def self.default Blank.new @@ -75,15 +75,7 @@ def initialize(raw_value) @raw_value = raw_value freeze end - - # TODO: Extract field types - # TODO: Add - # Date - # Time - # DateTime - # Boolean - # Boolean end end