Sha256: 07f9a012b7d3f4c8093cc79dd824605af6f8a13de3721e80f56a6a30dcadfe45
Contents?: true
Size: 406 Bytes
Versions: 42
Compression:
Stored size: 406 Bytes
Contents
module Concerns module Form module UiAutocomplete extend ActiveSupport::Concern def autocomplete(attribute, options = {}) options.reverse_merge!(url: -> { url_for(action: attribute, format: :json) }) url = options.delete(:url) input attribute, as: :string, input_html: { class: 'ui-autocomplete-input', :'data-source-url' => url.call } end end end end
Version data entries
42 entries across 42 versions & 1 rubygems