def field_class_type_prefix(attr, options)
      if options[:as]
        options[:as].to_s.capitalize
      elsif options.has_key? :collection
        'Select'
      else
        derive_field_class_prefix attr
      end
    end
def field_class_type_prefix(attr, options)
      if options[:as]
        options[:as].to_s.capitalize
      elsif options.has_key? :collection
        'Select'
      else
        derive_field_class_prefix attr
      end
    end
Return first half of a field class name, based on the type of the
 field: 'Text', 'Email', 'Password', 'Textarea', 'Boolean', etc.
 Appending 'Field' to this gets you a real class, e.g. TextField