def polymorphic_options(metadata, wildcard = 'QUERY', select_options = {})
      urls = metadata[:remote_urls] || {}
      options = (metadata[:polymorphic_list] || []).map do |klass|
        [
          klass, klass,
          { data: { url: remote_url(urls[klass], klass, wildcard) } }
        ]
      end
      options_for_select options, select_options
    end
def polymorphic_options(metadata, wildcard = 'QUERY', select_options = {})
      urls = metadata[:remote_urls] || {}
      options = (metadata[:polymorphic_list] || []).map do |klass|
        [
          klass, klass,
          { data: { url: remote_url(urls[klass], klass, wildcard) } }
        ]
      end
      options_for_select options, select_options
    end
To generate dropdown options (class => url) for polymorphic class.
 @see https://github.com/reinteractive/wallaby/blob/master/app/assets/javascripts/wallaby/auto_select.js
   auto_select.js
 This function will pull out remote URLs from `metadata[:remote_urls]`
 (Class => url).
 @see ActionView::Helpers::FormOptionsHelper#options_for_select
 @param metadata [Hash]
 @param wildcard [String] wildcard to be used in the URL
 @param select_options [Hash]
 @return [String] options HTML