% block = properties['options'] args = properties.except('options') collection = block.call(f.object) if collection.class.to_s.demodulize == 'ActiveRecord_Relation' properties['id_method'] ||= :id properties['name_method'] ||= :name collection = options_from_collection_for_select( collection, properties['id_method'], properties['name_method'], @resource_instance.try(attribute) ) elsif ['Hash', 'Array', 'HashWithIndifferentAccess'].include? collection.class.to_s.demodulize if properties['grouped'].present? && properties['grouped'] collection = grouped_options_for_select(collection, @resource_instance.try(attribute)) else collection = options_for_select(collection, @resource_instance.try(attribute)) end end %> <% if args['multiple'].present? %>