<input for='HoboFields::Types::EnumString'>

A <select> menu containing the values of an ‘enum string’.

Attributes

  • labels - A hash that gives custom labels for the values of the enum. This attribute is present for backwards compatibility. A better way to customize the labels is to use the translation framework. The key for enum ‘e’ on field ‘f’ for model ‘m’ would be activerecord.attributes.m.f.e.
  • titleize - Set to false to have the value itself (rather than value.titleize) be the default label if translation fails. Default: true
  • first-option - a string to be used for an extra option in the first position. E.g. “Please choose…”
  • first-value - the value to be used with the first-option. Typically not used, meaning the option has a blank value.

Show Source

Related Tags


Edit this page