Class: Formtastic::Inputs::GooglePlacesInput

Inherits:
TextInput
  • Object
show all
Defined in:
lib/formtastic/inputs/google_places_input.rb

Instance Method Summary collapse

Instance Method Details

#to_htmlObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/formtastic/inputs/google_places_input.rb', line 4

def to_html
  input_wrapping do
    label_html <<
        template.(:div, input_html_options.merge(class: 'google-places')) do
          builder.hidden_field(input_name, input_html_options.merge(class: 'google-places-hidden-field')) <<
              template.(:input, input_html_options.merge(class: 'google-places-field', type: 'text')) do
                template.(:input, input_html_options.merge(class: 'google-places-label-field', type: 'text', disabled: true, style: 'margin: auto;margin-top: 15px;', value: (object.send(method)))) do
                end
              end
        end
  end
end