lib/formulario/fields/field.rb in formulario-0.1.8 vs lib/formulario/fields/field.rb in formulario-0.1.9
- old
+ new
@@ -14,9 +14,13 @@
Collection => Formulario::Field::Collection,
:collection => Formulario::Field::Collection,
:array => Formulario::Field::Collection,
}
+ def self.type_for(type)
+ TYPES.fetch(type)
+ end
+
attr_reader :raw_value
def self.for(raw_value)
if raw_value.is_a?(Field)
raw_value