plataformatec/simple_form — pull request #995 by lewiseason (2014-03-08 01:24:01+00:00)
Title: Add EnumInput

This uses a little magic to infer how your enum works, but I think this will work in most cases.

The purpose of the `map_collection` method is to allow for custom mappings:

```
class EnumLocaleInput < SimpleForm::Inputs::EnumInput
def map_collection(collection, attribute_name)
collection.map { |slug, index| [I18n.t("enums.#{attribute_name}.#{slug}"), slug]}
end
end
```

Very basic starting point. What do we think?