This will try translating the given option as defined by simple_form and
fallback to the actual value if no translation is found. If no option is
found matching the given value a more useful error will be raised
telling the user an option matching the given input was not found.
For now, I've only implemented this for StringInput. I'm aware we have other input classes working with select elements that also would benefit from this change. I'd love to discuss how we implement this nicely so all relevant input classes can benefit from this change.
This will try translating the given option as defined by simple_form and fallback to the actual value if no translation is found. If no option is found matching the given value a more useful error will be raised telling the user an option matching the given input was not found.
For now, I've only implemented this for
StringInput
. I'm aware we have other input classes working with select elements that also would benefit from this change. I'd love to discuss how we implement this nicely so all relevant input classes can benefit from this change./cc @calebthompson