administrate-field-enum
administrate-field-enum copied to clipboard
Add option to filter select values
Why?
We had the need to restrict certain enum values from the dropdown select form
Changes
- Added
option_filterwhich returns either a no-op filter proc by default or a filter proc that evaluates and filters the provided options and &filtered_optionsto return the new select options array - Updated
form.erbto usefiltered_options