Module: ActiveAdminAddons::SelectFilterInputExtension
- Defined in:
- lib/activeadmin_addons/support/select_filter_input_extension.rb
Instance Method Summary collapse
Instance Method Details
#collection ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/activeadmin_addons/support/select_filter_input_extension.rb', line 7 def collection if ![:collection] && collection_from_enum? EnumUtils.(klass, method.to_s, use_db_value: true) else super end end |
#collection_from_enum? ⇒ Boolean
3 4 5 |
# File 'lib/activeadmin_addons/support/select_filter_input_extension.rb', line 3 def collection_from_enum? klass.respond_to?(:defined_enums) && klass.defined_enums.has_key?(method.to_s) end |