class SimpleForm::Inputs::CollectionInput
def detect_collection_methods
SimpleForm.collection_label_methods and
on default label and value methods that can be configured through
If no label or value method are defined, will attempt to find them based
Detect the right method to find the label and value for a collection.
def detect_collection_methods label, value = options.delete(:label_method), options.delete(:value_method) unless label && value common_method_for = detect_common_display_methods label ||= common_method_for[:label] value ||= common_method_for[:value] end [label, value] end