Class: Decidim::Map::Autocomplete::Builder
- Inherits:
-
Frontend::Builder
- Object
- Frontend::Builder
- Decidim::Map::Autocomplete::Builder
- Defined in:
- lib/decidim/map/autocomplete.rb
Overview
A builder for the geocoding autocompletion to be attached to the views. Provides all the necessary functionality to initialize the front-end geocoding autocompletion functionality.
Direct Known Subclasses
Provider::Autocomplete::Here::Builder, Provider::Autocomplete::Osm::Builder
Instance Method Summary collapse
-
#geocoding_field(object_name, method, options = {}) ⇒ String
Displays the geocoding field element’s markup for the view.
Methods inherited from Frontend::Builder
#initialize, #javascript_snippets, #stylesheet_snippets
Constructor Details
This class inherits a constructor from Decidim::Map::Frontend::Builder
Instance Method Details
#geocoding_field(object_name, method, options = {}) ⇒ String
Displays the geocoding field element’s markup for the view.
20 21 22 23 24 25 26 27 28 |
# File 'lib/decidim/map/autocomplete.rb', line 20 def geocoding_field(object_name, method, = {}) [:autocomplete] ||= "off" template.text_field( object_name, method, .merge("data-decidim-geocoding" => .to_json) ) end |